commit
stringlengths
40
40
old_file
stringlengths
4
112
new_file
stringlengths
4
112
old_contents
stringlengths
0
2.05k
new_contents
stringlengths
28
3.9k
subject
stringlengths
17
736
message
stringlengths
18
4.78k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
7
111k
e501b91a4a8f680ed453a6ad372f07d0836ab42b
Core/Code/Testing/mitkRenderingTestHelper.h
Core/Code/Testing/mitkRenderingTestHelper.h
/*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $ Version: $Revision: 21985 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef mitkRenderingTestHelper_h #define mitkRenderingTestHelper_h #include <string> #include <vtkSmartPointer.h> #include <vtkRenderWindow.h> #include <mitkRenderWindow.h> class vtkRenderWindow; class vtkRenderer; namespace mitk { class DataStorage; } class MITK_CORE_EXPORT mitkRenderingTestHelper { public: mitkRenderingTestHelper(int width, int height, mitk::DataStorage* ds); ~mitkRenderingTestHelper(); vtkRenderer* GetVtkRenderer(); vtkRenderWindow* GetVtkRenderWindow(); void SaveAsPNG(std::string fileName); protected: mitk::RenderWindow::Pointer m_RenderWindow; }; #endif
/*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $ Version: $Revision: 21985 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef mitkRenderingTestHelper_h #define mitkRenderingTestHelper_h #include <string> #include <vtkSmartPointer.h> #include <vtkRenderWindow.h> #include <mitkRenderWindow.h> class vtkRenderWindow; class vtkRenderer; namespace mitk { class DataStorage; } class mitkRenderingTestHelper { public: mitkRenderingTestHelper(int width, int height, mitk::DataStorage* ds); ~mitkRenderingTestHelper(); vtkRenderer* GetVtkRenderer(); vtkRenderWindow* GetVtkRenderWindow(); void SaveAsPNG(std::string fileName); protected: mitk::RenderWindow::Pointer m_RenderWindow; }; #endif
Fix linker warnings in rendering tests
Fix linker warnings in rendering tests
C
bsd-3-clause
nocnokneo/MITK,danielknorr/MITK,iwegner/MITK,NifTK/MITK,danielknorr/MITK,danielknorr/MITK,NifTK/MITK,lsanzdiaz/MITK-BiiG,MITK/MITK,nocnokneo/MITK,rfloca/MITK,fmilano/mitk,fmilano/mitk,lsanzdiaz/MITK-BiiG,rfloca/MITK,MITK/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,MITK/MITK,NifTK/MITK,danielknorr/MITK,fmilano/mitk,fmilano/mitk,rfloca/MITK,danielknorr/MITK,MITK/MITK,iwegner/MITK,RabadanLab/MITKats,danielknorr/MITK,NifTK/MITK,danielknorr/MITK,nocnokneo/MITK,nocnokneo/MITK,RabadanLab/MITKats,nocnokneo/MITK,fmilano/mitk,iwegner/MITK,RabadanLab/MITKats,nocnokneo/MITK,rfloca/MITK,MITK/MITK,rfloca/MITK,lsanzdiaz/MITK-BiiG,fmilano/mitk,nocnokneo/MITK,iwegner/MITK,lsanzdiaz/MITK-BiiG,NifTK/MITK,RabadanLab/MITKats,MITK/MITK,rfloca/MITK,RabadanLab/MITKats,RabadanLab/MITKats,NifTK/MITK,fmilano/mitk,lsanzdiaz/MITK-BiiG,rfloca/MITK,lsanzdiaz/MITK-BiiG
3cd04e32a8cd9497bd2882d7767e40ae9a936e24
test/sanitizer_common/print_address.h
test/sanitizer_common/print_address.h
#include <stdio.h> #include <stdarg.h> void print_address(const char *str, int n, ...) { fprintf(stderr, "%s", str); va_list ap; va_start(ap, n); while (n--) { void *p = va_arg(ap, void *); #if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) // On FreeBSD, the %p conversion specifier works as 0x%x and thus does not // match to the format used in the diagnotic message. fprintf(stderr, "0x%012lx ", (unsigned long) p); #elif defined(__i386__) || defined(__arm__) fprintf(stderr, "0x%8lx ", (unsigned long) p); #elif defined(__mips64) fprintf(stderr, "0x%010lx ", (unsigned long) p); #endif } fprintf(stderr, "\n"); }
#include <stdio.h> #include <stdarg.h> void print_address(const char *str, int n, ...) { fprintf(stderr, "%s", str); va_list ap; va_start(ap, n); while (n--) { void *p = va_arg(ap, void *); #if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) // On FreeBSD, the %p conversion specifier works as 0x%x and thus does not // match to the format used in the diagnotic message. fprintf(stderr, "0x%012lx ", (unsigned long) p); #elif defined(__i386__) || defined(__arm__) fprintf(stderr, "0x%08lx ", (unsigned long) p); #elif defined(__mips64) fprintf(stderr, "0x%010lx ", (unsigned long) p); #endif } fprintf(stderr, "\n"); }
Use 0-padding for i386 and arm print format specifiers
Use 0-padding for i386 and arm print format specifiers Summary: This is used for the other architectures in print_address, but is missing from i386 and arm. Reviewers: m.ostapenko, spetrovic Subscribers: aemerson, rengolin, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D31977 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@300065 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
3fff79f7dd1d8821a2d6c730f2aff3f994a15558
crypto/s2n_hkdf.h
crypto/s2n_hkdf.h
/* * Copyright 2016 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 <stdint.h> #include "utils/s2n_blob.h" #include "crypto/s2n_hmac.h" extern int s2n_hkdf(struct s2n_hmac_state *hmac, s2n_hmac_algorithm alg, const struct s2n_blob *salt, const struct s2n_blob *key, const struct s2n_blob *info, struct s2n_blob *output);
/* * Copyright 2016 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 <stdint.h> #include "utils/s2n_blob.h" #include "crypto/s2n_hmac.h" extern int s2n_hkdf(struct s2n_hmac_state *hmac, s2n_hmac_algorithm alg, const struct s2n_blob *salt, const struct s2n_blob *key, const struct s2n_blob *info, struct s2n_blob *output); extern int s2n_hkdf_extract(struct s2n_hmac_state *hmac, s2n_hmac_algorithm alg, const struct s2n_blob *salt, const struct s2n_blob *key, struct s2n_blob *pseudo_rand_key); extern int s2n_hkdf_expand_label(struct s2n_hmac_state *hmac, s2n_hmac_algorithm alg, const struct s2n_blob *secret, const struct s2n_blob *label, const struct s2n_blob *context, struct s2n_blob *output);
Add missing header changes from previous commit
Add missing header changes from previous commit
C
apache-2.0
wcs1only/s2n,awslabs/s2n,gibson-compsci/s2n,PKRoma/s2n,awslabs/s2n,PKRoma/s2n,colmmacc/s2n,alexeblee/s2n,raycoll/s2n,raycoll/s2n,wcs1only/s2n,PKRoma/s2n,alexeblee/s2n,gibson-compsci/s2n,wcs1only/s2n,colmmacc/s2n,raycoll/s2n,wcs1only/s2n,colmmacc/s2n,wcs1only/s2n,awslabs/s2n,raycoll/s2n,PKRoma/s2n,PKRoma/s2n,alexeblee/s2n,raycoll/s2n,alexeblee/s2n,gibson-compsci/s2n,alexeblee/s2n,gibson-compsci/s2n,wcs1only/s2n,PKRoma/s2n,gibson-compsci/s2n,PKRoma/s2n,wcs1only/s2n,wcs1only/s2n,colmmacc/s2n,awslabs/s2n,awslabs/s2n,colmmacc/s2n,raycoll/s2n,colmmacc/s2n,awslabs/s2n,alexeblee/s2n,gibson-compsci/s2n,PKRoma/s2n
412865c8ea9f94a487d9887360b8adb6032e6a80
test/Profile/profile-does-not-exist.c
test/Profile/profile-does-not-exist.c
// RUN: not %clang_cc1 -emit-llvm %s -fprofile-instr-use=%t.nonexistent.profdata 2>&1 | FileCheck %s // CHECK: error: Could not read profile: // CHECK-NOT: Assertion failed
// RUN: not %clang_cc1 -emit-llvm %s -o - -fprofile-instr-use=%t.nonexistent.profdata 2>&1 | FileCheck %s // CHECK: error: Could not read profile: // CHECK-NOT: Assertion failed
Fix this test so it doesn't try to open a file to write to the source tree
Fix this test so it doesn't try to open a file to write to the source tree git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@234173 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
75488d5639819f31b01f76433b82d6259323230d
unix-cpy/mpconfigport.h
unix-cpy/mpconfigport.h
// options to control how Micro Python is built #define MICROPY_EMIT_CPYTHON (1) #define MICROPY_ENABLE_LEXER_UNIX (1) #define MICROPY_ENABLE_FLOAT (1) // type definitions for the specific machine #ifdef __LP64__ typedef long machine_int_t; // must be pointer size typedef unsigned long machine_uint_t; // must be pointer size #else // These are definitions for machines where sizeof(int) == sizeof(void*), // regardless for actual size. typedef int machine_int_t; // must be pointer size typedef unsigned int machine_uint_t; // must be pointer size #endif #define BYTES_PER_WORD sizeof(machine_int_t) typedef void *machine_ptr_t; // must be of pointer size typedef const void *machine_const_ptr_t; // must be of pointer size typedef double machine_float_t; machine_float_t machine_sqrt(machine_float_t x);
// options to control how Micro Python is built #define MICROPY_EMIT_CPYTHON (1) #define MICROPY_ENABLE_LEXER_UNIX (1) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE) // type definitions for the specific machine #ifdef __LP64__ typedef long machine_int_t; // must be pointer size typedef unsigned long machine_uint_t; // must be pointer size #else // These are definitions for machines where sizeof(int) == sizeof(void*), // regardless for actual size. typedef int machine_int_t; // must be pointer size typedef unsigned int machine_uint_t; // must be pointer size #endif #define BYTES_PER_WORD sizeof(machine_int_t) typedef void *machine_ptr_t; // must be of pointer size typedef const void *machine_const_ptr_t; // must be of pointer size typedef double machine_float_t; machine_float_t machine_sqrt(machine_float_t x);
Switch to use MICROPY_FLOAT_IMPL config define.
unix-cpy: Switch to use MICROPY_FLOAT_IMPL config define.
C
mit
micropython/micropython-esp32,SHA2017-badge/micropython-esp32,torwag/micropython,AriZuu/micropython,xhat/micropython,utopiaprince/micropython,AriZuu/micropython,ahotam/micropython,heisewangluo/micropython,firstval/micropython,hiway/micropython,cloudformdesign/micropython,mianos/micropython,kostyll/micropython,Timmenem/micropython,xuxiaoxin/micropython,matthewelse/micropython,rubencabrera/micropython,Vogtinator/micropython,bvernoux/micropython,infinnovation/micropython,deshipu/micropython,cnoviello/micropython,henriknelson/micropython,omtinez/micropython,adamkh/micropython,lowRISC/micropython,mgyenik/micropython,martinribelotta/micropython,infinnovation/micropython,kerneltask/micropython,trezor/micropython,dxxb/micropython,ryannathans/micropython,mianos/micropython,blazewicz/micropython,tuc-osg/micropython,methoxid/micropystat,lowRISC/micropython,rubencabrera/micropython,utopiaprince/micropython,ericsnowcurrently/micropython,pfalcon/micropython,torwag/micropython,ganshun666/micropython,xyb/micropython,blmorris/micropython,hosaka/micropython,adafruit/micropython,firstval/micropython,ChuckM/micropython,feilongfl/micropython,orionrobots/micropython,SungEun-Steve-Kim/test-mp,paul-xxx/micropython,adamkh/micropython,Peetz0r/micropython-esp32,ceramos/micropython,aitjcize/micropython,martinribelotta/micropython,micropython/micropython-esp32,KISSMonX/micropython,rubencabrera/micropython,dmazzella/micropython,mpalomer/micropython,supergis/micropython,ceramos/micropython,ChuckM/micropython,danicampora/micropython,firstval/micropython,cwyark/micropython,dhylands/micropython,slzatz/micropython,Timmenem/micropython,ceramos/micropython,noahwilliamsson/micropython,cwyark/micropython,stonegithubs/micropython,suda/micropython,mpalomer/micropython,ChuckM/micropython,blmorris/micropython,MrSurly/micropython-esp32,methoxid/micropystat,blazewicz/micropython,oopy/micropython,EcmaXp/micropython,AriZuu/micropython,dmazzella/micropython,feilongfl/micropython,bvernoux/micropython,jlillest/micropython,tdautc19841202/micropython,jlillest/micropython,trezor/micropython,stonegithubs/micropython,redbear/micropython,hosaka/micropython,ganshun666/micropython,warner83/micropython,neilh10/micropython,lbattraw/micropython,ahotam/micropython,skybird6672/micropython,bvernoux/micropython,HenrikSolver/micropython,oopy/micropython,kostyll/micropython,aethaniel/micropython,galenhz/micropython,MrSurly/micropython-esp32,paul-xxx/micropython,torwag/micropython,matthewelse/micropython,vriera/micropython,PappaPeppar/micropython,pozetroninc/micropython,selste/micropython,MrSurly/micropython,ruffy91/micropython,tuc-osg/micropython,jmarcelino/pycom-micropython,danicampora/micropython,chrisdearman/micropython,heisewangluo/micropython,ernesto-g/micropython,praemdonck/micropython,swegener/micropython,ahotam/micropython,pfalcon/micropython,alex-robbins/micropython,redbear/micropython,drrk/micropython,infinnovation/micropython,cloudformdesign/micropython,henriknelson/micropython,Vogtinator/micropython,adamkh/micropython,torwag/micropython,TDAbboud/micropython,dinau/micropython,turbinenreiter/micropython,martinribelotta/micropython,adafruit/micropython,redbear/micropython,hosaka/micropython,SungEun-Steve-Kim/test-mp,MrSurly/micropython-esp32,SungEun-Steve-Kim/test-mp,dmazzella/micropython,adafruit/circuitpython,tralamazza/micropython,henriknelson/micropython,jimkmc/micropython,SHA2017-badge/micropython-esp32,mpalomer/micropython,methoxid/micropystat,KISSMonX/micropython,jlillest/micropython,galenhz/micropython,alex-march/micropython,tobbad/micropython,kerneltask/micropython,drrk/micropython,aethaniel/micropython,dinau/micropython,pramasoul/micropython,alex-march/micropython,tobbad/micropython,xuxiaoxin/micropython,vitiral/micropython,deshipu/micropython,alex-robbins/micropython,selste/micropython,Timmenem/micropython,tdautc19841202/micropython,mgyenik/micropython,feilongfl/micropython,lowRISC/micropython,ryannathans/micropython,cwyark/micropython,micropython/micropython-esp32,EcmaXp/micropython,noahwilliamsson/micropython,mhoffma/micropython,ahotam/micropython,adafruit/circuitpython,skybird6672/micropython,mianos/micropython,PappaPeppar/micropython,ernesto-g/micropython,omtinez/micropython,aitjcize/micropython,vitiral/micropython,chrisdearman/micropython,heisewangluo/micropython,cnoviello/micropython,swegener/micropython,ernesto-g/micropython,ryannathans/micropython,mpalomer/micropython,rubencabrera/micropython,mianos/micropython,mgyenik/micropython,emfcamp/micropython,neilh10/micropython,trezor/micropython,lowRISC/micropython,ericsnowcurrently/micropython,slzatz/micropython,xhat/micropython,jmarcelino/pycom-micropython,AriZuu/micropython,ruffy91/micropython,galenhz/micropython,ganshun666/micropython,dxxb/micropython,mpalomer/micropython,toolmacher/micropython,jimkmc/micropython,supergis/micropython,Vogtinator/micropython,pfalcon/micropython,ruffy91/micropython,bvernoux/micropython,omtinez/micropython,PappaPeppar/micropython,swegener/micropython,deshipu/micropython,paul-xxx/micropython,mhoffma/micropython,matthewelse/micropython,vriera/micropython,vitiral/micropython,ryannathans/micropython,xhat/micropython,alex-march/micropython,lbattraw/micropython,jmarcelino/pycom-micropython,tuc-osg/micropython,drrk/micropython,firstval/micropython,blazewicz/micropython,tdautc19841202/micropython,tralamazza/micropython,warner83/micropython,ernesto-g/micropython,misterdanb/micropython,aitjcize/micropython,deshipu/micropython,dhylands/micropython,xuxiaoxin/micropython,matthewelse/micropython,PappaPeppar/micropython,MrSurly/micropython,xyb/micropython,AriZuu/micropython,xyb/micropython,alex-robbins/micropython,puuu/micropython,ernesto-g/micropython,aethaniel/micropython,ganshun666/micropython,feilongfl/micropython,dhylands/micropython,tdautc19841202/micropython,MrSurly/micropython,suda/micropython,emfcamp/micropython,turbinenreiter/micropython,PappaPeppar/micropython,noahchense/micropython,MrSurly/micropython,dinau/micropython,warner83/micropython,noahchense/micropython,henriknelson/micropython,tobbad/micropython,noahchense/micropython,adamkh/micropython,dxxb/micropython,trezor/micropython,orionrobots/micropython,ceramos/micropython,misterdanb/micropython,adafruit/micropython,hosaka/micropython,infinnovation/micropython,martinribelotta/micropython,turbinenreiter/micropython,noahchense/micropython,SungEun-Steve-Kim/test-mp,cwyark/micropython,selste/micropython,dxxb/micropython,jlillest/micropython,tobbad/micropython,omtinez/micropython,ryannathans/micropython,dhylands/micropython,ericsnowcurrently/micropython,emfcamp/micropython,galenhz/micropython,swegener/micropython,feilongfl/micropython,adamkh/micropython,emfcamp/micropython,danicampora/micropython,pramasoul/micropython,vriera/micropython,praemdonck/micropython,dmazzella/micropython,xyb/micropython,noahwilliamsson/micropython,kostyll/micropython,suda/micropython,hiway/micropython,drrk/micropython,danicampora/micropython,alex-march/micropython,heisewangluo/micropython,tuc-osg/micropython,adafruit/micropython,pozetroninc/micropython,ruffy91/micropython,alex-robbins/micropython,ceramos/micropython,KISSMonX/micropython,chrisdearman/micropython,MrSurly/micropython-esp32,HenrikSolver/micropython,vriera/micropython,cloudformdesign/micropython,aethaniel/micropython,misterdanb/micropython,TDAbboud/micropython,tralamazza/micropython,turbinenreiter/micropython,orionrobots/micropython,firstval/micropython,pfalcon/micropython,praemdonck/micropython,misterdanb/micropython,dinau/micropython,SungEun-Steve-Kim/test-mp,supergis/micropython,Timmenem/micropython,chrisdearman/micropython,deshipu/micropython,misterdanb/micropython,blazewicz/micropython,skybird6672/micropython,mhoffma/micropython,warner83/micropython,adafruit/micropython,micropython/micropython-esp32,adafruit/circuitpython,suda/micropython,turbinenreiter/micropython,SHA2017-badge/micropython-esp32,neilh10/micropython,kerneltask/micropython,methoxid/micropystat,lbattraw/micropython,ruffy91/micropython,redbear/micropython,KISSMonX/micropython,bvernoux/micropython,jmarcelino/pycom-micropython,dhylands/micropython,kostyll/micropython,mianos/micropython,neilh10/micropython,toolmacher/micropython,lowRISC/micropython,alex-robbins/micropython,HenrikSolver/micropython,heisewangluo/micropython,supergis/micropython,selste/micropython,warner83/micropython,praemdonck/micropython,utopiaprince/micropython,EcmaXp/micropython,micropython/micropython-esp32,noahwilliamsson/micropython,mhoffma/micropython,blmorris/micropython,pramasoul/micropython,kerneltask/micropython,xuxiaoxin/micropython,henriknelson/micropython,slzatz/micropython,rubencabrera/micropython,cwyark/micropython,chrisdearman/micropython,galenhz/micropython,jmarcelino/pycom-micropython,orionrobots/micropython,oopy/micropython,ChuckM/micropython,suda/micropython,Timmenem/micropython,Vogtinator/micropython,puuu/micropython,HenrikSolver/micropython,Peetz0r/micropython-esp32,toolmacher/micropython,oopy/micropython,neilh10/micropython,pozetroninc/micropython,adafruit/circuitpython,jimkmc/micropython,jlillest/micropython,paul-xxx/micropython,swegener/micropython,lbattraw/micropython,cloudformdesign/micropython,hiway/micropython,emfcamp/micropython,EcmaXp/micropython,cnoviello/micropython,trezor/micropython,lbattraw/micropython,Peetz0r/micropython-esp32,xuxiaoxin/micropython,pramasoul/micropython,drrk/micropython,puuu/micropython,dinau/micropython,MrSurly/micropython,Peetz0r/micropython-esp32,cloudformdesign/micropython,vitiral/micropython,blmorris/micropython,jimkmc/micropython,hosaka/micropython,omtinez/micropython,matthewelse/micropython,cnoviello/micropython,hiway/micropython,aitjcize/micropython,methoxid/micropystat,tdautc19841202/micropython,ahotam/micropython,cnoviello/micropython,SHA2017-badge/micropython-esp32,SHA2017-badge/micropython-esp32,mhoffma/micropython,martinribelotta/micropython,matthewelse/micropython,noahwilliamsson/micropython,oopy/micropython,ChuckM/micropython,puuu/micropython,KISSMonX/micropython,tuc-osg/micropython,mgyenik/micropython,xyb/micropython,adafruit/circuitpython,praemdonck/micropython,ericsnowcurrently/micropython,redbear/micropython,HenrikSolver/micropython,noahchense/micropython,utopiaprince/micropython,aethaniel/micropython,orionrobots/micropython,dxxb/micropython,mgyenik/micropython,utopiaprince/micropython,slzatz/micropython,hiway/micropython,pramasoul/micropython,toolmacher/micropython,puuu/micropython,vitiral/micropython,blazewicz/micropython,danicampora/micropython,supergis/micropython,blmorris/micropython,ganshun666/micropython,TDAbboud/micropython,Vogtinator/micropython,tobbad/micropython,Peetz0r/micropython-esp32,stonegithubs/micropython,xhat/micropython,torwag/micropython,TDAbboud/micropython,toolmacher/micropython,jimkmc/micropython,pfalcon/micropython,pozetroninc/micropython,adafruit/circuitpython,TDAbboud/micropython,ericsnowcurrently/micropython,MrSurly/micropython-esp32,kostyll/micropython,paul-xxx/micropython,infinnovation/micropython,skybird6672/micropython,vriera/micropython,alex-march/micropython,stonegithubs/micropython,EcmaXp/micropython,xhat/micropython,selste/micropython,tralamazza/micropython,slzatz/micropython,kerneltask/micropython,skybird6672/micropython,stonegithubs/micropython,pozetroninc/micropython
1a3c1576138400b28ca7093a842dc7d044d5892b
MKFirebaseObjectMapping/Classes/MKFirebaseModel.h
MKFirebaseObjectMapping/Classes/MKFirebaseModel.h
// // Created by Michael Kuck on 7/7/16. // Copyright (c) 2016 Michael Kuck. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @class FIRDatabaseReference; @class FIRDataSnapshot; //============================================================ //== Public Interface //============================================================ @interface MKFirebaseModel : NSObject @property (nonatomic, readonly) FIRDatabaseReference *firebaseRef; @property (nonatomic, readonly) NSString *identifier; - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithFirebaseRef:(FIRDatabaseReference *)firebaseRef snapshotValue:(NSDictionary *)snapshotValue NS_DESIGNATED_INITIALIZER; - (instancetype)initWithSnapshot:(FIRDataSnapshot *)snapshot; @end NS_ASSUME_NONNULL_END
// // Created by Michael Kuck on 7/7/16. // Copyright (c) 2016 Michael Kuck. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @class FIRDatabaseReference; @class FIRDataSnapshot; //============================================================ //== Public Interface //============================================================ @interface MKFirebaseModel : NSObject @property (nonatomic, readonly) FIRDatabaseReference *firebaseRef; @property (nonatomic, readonly) NSString *identifier; - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithFirebaseRef:(FIRDatabaseReference *)firebaseRef snapshotValue:(NSDictionary *)snapshotValue NS_DESIGNATED_INITIALIZER; - (instancetype)initWithSnapshot:(FIRDataSnapshot *)snapshot; - (BOOL)isEqualToFirebaseModel:(MKFirebaseModel *)firebaseModel; @end NS_ASSUME_NONNULL_END
Add `isEqualToFirebaseModel:` to public header
Add `isEqualToFirebaseModel:` to public header
C
mit
mikumi/MKFirebaseObjectMapping,mikumi/MKFirebaseObjectMapping,mikumi/MKFirebaseObjectMapping
8e1f636ced4380a559aaf8eb14cae88442fc15c1
lib/Solenoid/Solenoid.h
lib/Solenoid/Solenoid.h
/**************************************************************************** * Copyright 2016 BlueMasters * * 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 SOLENOID__H #define SOLENOID__H #include <Arduino.h> #include "StateMachine.h" #include "LED.h" #include "RFIDSensor.h" #include "WolvesTypes.h" enum solenoidState { SOLENOID_IDLE, SOLENOID_FROZEN, SOLENOID_FIRED, SOLENOID_WAITING }; class Solenoid : public StateMachine { public: Solenoid(int impulsePin, RFIDSensor sensor, LED led) : _impulsePin(impulsePin), _sensor(sensor), _led(led) {}; void begin(); void on(); void off(); void tick(); private: int _impulsePin; RFIDSensor _sensor; LED _led; solenoidState _state; long _timestamp; void fire(long t); void release(long t); }; #endif
/**************************************************************************** * Copyright 2016 BlueMasters * * 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 SOLENOID__H #define SOLENOID__H #include <Arduino.h> #include "StateMachine.h" #include "LED.h" #include "RFIDSensor.h" #include "WolvesTypes.h" class Solenoid : public StateMachine { public: Solenoid(int impulsePin, RFIDSensor sensor, LED led) : _impulsePin(impulsePin), _sensor(sensor), _led(led) {}; void begin(); void on(); void off(); void tick(); private: enum solenoidState { SOLENOID_IDLE, SOLENOID_FROZEN, SOLENOID_FIRED, SOLENOID_WAITING }; int _impulsePin; RFIDSensor _sensor; LED _led; solenoidState _state; long _timestamp; void fire(long t); void release(long t); }; #endif
Put states inside the class
Put states inside the class
C
apache-2.0
BlueMasters/arduino-wolves,BlueMasters/arduino-wolves,BlueMasters/arduino-wolves
34ac8717bf58b13a6c2b8743e57506255434d731
src/Developer/ImageFilterMultipleOutputs.h
src/Developer/ImageFilterMultipleOutputs.h
#ifndef __itkImageFilterMultipleOutputs_h #define __itkImageFilterMultipleOutputs_h #include "itkImageToImageFilter.h" namespace itk { template <class TImage> class ImageFilterMultipleOutputs : public ImageToImageFilter<TImage, TImage> { public: /** Standard class type alias. */ using Self = ImageFilterMultipleOutputs; using Superclass = ImageToImageFilter<TImage, TImage>; using Pointer = SmartPointer<Self>; /** Method for creation through the object factory. */ itkNewMacro(Self); /** Run-time type information (and related methods). */ itkTypeMacro(ImageFilterMultipleOutputs, ImageToImageFilter); TImage * GetOutput1(); TImage * GetOutput2(); protected: ImageFilterMultipleOutputs(); ~ImageFilterMultipleOutputs() override = default; /** Does the real work. */ void GenerateData() override; /** Create the Output */ DataObject::Pointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx); private: ImageFilterMultipleOutputs(const Self &) = delete; // purposely not implemented void operator=(const Self &) = delete; // purposely not implemented }; } // namespace itk #ifndef ITK_MANUAL_INSTANTIATION # include "ImageFilterMultipleOutputs.hxx" #endif #endif // __itkImageFilterMultipleOutputs_h
#ifndef __itkImageFilterMultipleOutputs_h #define __itkImageFilterMultipleOutputs_h #include "itkImageToImageFilter.h" namespace itk { template <class TImage> class ImageFilterMultipleOutputs : public ImageToImageFilter<TImage, TImage> { public: /** Standard class type alias. */ using Self = ImageFilterMultipleOutputs; using Superclass = ImageToImageFilter<TImage, TImage>; using Pointer = SmartPointer<Self>; /** Method for creation through the object factory. */ itkNewMacro(Self); /** Run-time type information (and related methods). */ itkTypeMacro(ImageFilterMultipleOutputs, ImageToImageFilter); TImage * GetOutput1(); TImage * GetOutput2(); protected: ImageFilterMultipleOutputs(); ~ImageFilterMultipleOutputs() override = default; /** Does the real work. */ void GenerateData() override; /** Create the Output */ DataObject::Pointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override; private: ImageFilterMultipleOutputs(const Self &) = delete; // purposely not implemented void operator=(const Self &) = delete; // purposely not implemented }; } // namespace itk #ifndef ITK_MANUAL_INSTANTIATION # include "ImageFilterMultipleOutputs.hxx" #endif #endif // __itkImageFilterMultipleOutputs_h
Remove redundant void argument lists
STYLE: Remove redundant void argument lists Find and remove redundant void argument lists.
C
apache-2.0
InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples
fdeab35e4997c16515efea32d97845786d373990
tests/test_utilities.h
tests/test_utilities.h
#pragma once #include <string> #include <sstream> #include <Eigen/Dense> std::string output_matrices(Eigen::MatrixXd expected, Eigen::MatrixXd actual) { std::stringstream ss; ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl; return ss.str(); }
#pragma once #include <string> #include <sstream> #include <Eigen/Dense> std::string output_matrices(Eigen::MatrixXd expected, Eigen::MatrixXd actual) { std::stringstream ss; ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl; return ss.str(); } /* * allclose() function to match numpy.allclose * https://stackoverflow.com/questions/15051367/how-to-compare-vectors-approximately-in-eige://stackoverflow.com/questions/15051367/how-to-compare-vectors-approximately-in-eigen */ namespace test { template<typename DerivedA, typename DerivedB> bool allclose(const Eigen::DenseBase<DerivedA>& a, const Eigen::DenseBase<DerivedB>& b, const typename DerivedA::RealScalar& rtol = Eigen::NumTraits<typename DerivedA::RealScalar>::dummy_precision(), const typename DerivedA::RealScalar& atol = Eigen::NumTraits<typename DerivedA::RealScalar>::epsilon()) { return ((a.derived() - b.derived()).array().abs() <= (atol + rtol * b.derived().array().abs())).all(); } } // namespace test
Add allclose function for testing
Add allclose function for testing Compare relative and absolute tolerence of matrix elements. Eigen isApprox() functions compare matrix norms.
C
bsd-2-clause
oliverlee/bicycle,oliverlee/bicycle
01167b09c4f76073a9846cf5bfe745350e8fca5a
example/ex-defer01.c
example/ex-defer01.c
#include "m-core.h" // Stubs defined for the example. Real code will use soundio library. struct SoundIo { int x; }; struct SoundIoDevice { int x; }; struct SoundIoOutStream { int x; }; static struct SoundIo *soundio_create(void) { return (struct SoundIo *) malloc(sizeof(struct SoundIo)); } static void soundio_destroy(struct SoundIo *s) { free(s); } static struct SoundIoDevice *soundio_get_device(struct SoundIo *io, int def) { (void) io; (void) def; return (struct SoundIoDevice *) malloc(sizeof(struct SoundIoDevice)); } static void soundio_device_unref(struct SoundIoDevice *s) { free(s); } static struct SoundIoOutStream *soundio_outstream_create(struct SoundIoDevice *device) { (void) device ; return (struct SoundIoOutStream *) malloc(sizeof(struct SoundIoOutStream)); } static void soundio_outstream_destroy(struct SoundIoOutStream *s) { free(s); } static bool soundio_wait_events(struct SoundIo *s) { (void) s; return false; } // End of stubs int main(void) { int err = 1; /* Example of using M_LET_IF macro to simplify writing error handling code. The following code creates some object, test if the object creation succeeds, register the destructor, and print an error if something went wrong */ M_LET_IF( struct SoundIo *soundio = soundio_create(), soundio != 0 , soundio_destroy(soundio) , fprintf(stderr, "out of memory for soundio\n") ) M_LET_IF(struct SoundIoDevice *device = soundio_get_device(soundio, -1), device != 0, soundio_device_unref(device), fprintf(stderr, "out of memory for device\n")) M_LET_IF(struct SoundIoOutStream *outstream = soundio_outstream_create(device), outstream != 0, soundio_outstream_destroy(outstream), fprintf(stderr, "out of memory for stream\n")) { err = 0; bool cont = true; while (cont) cont = soundio_wait_events(soundio); } return err; }
Add an example of M_LET_IF
Add an example of M_LET_IF
C
bsd-2-clause
P-p-H-d/mlib,P-p-H-d/mlib
4282ccf09f23c582b16cdc4570de238ac959a2dd
firmware/MDNS.h
firmware/MDNS.h
#include "application.h" #ifndef _INCL_MDNS #define _INCL_MDNS #include "Buffer.h" #include "Label.h" #include "Record.h" #include <map> #include <vector> #define MDNS_PORT 5353 #define BUFFER_SIZE 512 #define HOSTNAME "" class MDNS { public: bool setHostname(String hostname); bool addService(String protocol, String service, uint16_t port, String instance, std::vector<String> subServices = std::vector<String>()); void addTXTEntry(String key, String value = NULL); bool begin(); bool processQueries(); private: struct QueryHeader { uint16_t id; uint16_t flags; uint16_t qdcount; uint16_t ancount; uint16_t nscount; uint16_t arcount; }; UDP * udp = new UDP(); Buffer * buffer = new Buffer(BUFFER_SIZE); Label * ROOT = new Label(""); Label * LOCAL = new Label("local", ROOT); Label::Matcher * matcher = new Label::Matcher(); ARecord * aRecord; TXTRecord * txtRecord; std::map<String, Label *> labels; std::vector<Record *> records; String status = "Ok"; QueryHeader readHeader(Buffer * buffer); void getResponses(); void writeResponses(); bool isAlphaDigitHyphen(String string); bool isNetUnicode(String string); }; #endif
#include "application.h" #ifndef _INCL_MDNS #define _INCL_MDNS #include "Buffer.h" #include "Label.h" #include "Record.h" #include <map> #include <vector> #define MDNS_PORT 5353 #define BUFFER_SIZE 512 #define HOSTNAME "" class MDNS { public: bool setHostname(String hostname); bool addService(String protocol, String service, uint16_t port, String instance, std::vector<String> subServices = std::vector<String>()); void addTXTEntry(String key, String value = ""); bool begin(); bool processQueries(); private: struct QueryHeader { uint16_t id; uint16_t flags; uint16_t qdcount; uint16_t ancount; uint16_t nscount; uint16_t arcount; }; UDP * udp = new UDP(); Buffer * buffer = new Buffer(BUFFER_SIZE); Label * ROOT = new Label(""); Label * LOCAL = new Label("local", ROOT); Label::Matcher * matcher = new Label::Matcher(); ARecord * aRecord; TXTRecord * txtRecord; std::map<String, Label *> labels; std::vector<Record *> records; String status = "Ok"; QueryHeader readHeader(Buffer * buffer); void getResponses(); void writeResponses(); bool isAlphaDigitHyphen(String string); bool isNetUnicode(String string); }; #endif
Fix for particle firmware v0.6.2
Fix for particle firmware v0.6.2
C
mit
mrhornsby/spark-core-mdns,mrhornsby/spark-core-mdns
3cfe2d2e5b57ff33d4febcb0668d1d71fce2dd21
acacia_tests.c
acacia_tests.c
#include <string.h> #include "lib/minunit.h" #include "acacia.h" //#define TEST_KEY "abcd1111" #define TEST_KEY "abcdefghijklmnopqrstuvwxyz" #define TEST_VALUE "foo_bar_baz_111" MU_TEST(test_check) { struct Node *cache = cache_init(); cache_set(TEST_KEY, TEST_VALUE, cache); mu_check(strcmp(cache_get(TEST_KEY, cache), TEST_VALUE) == 0); cache_close(cache); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(int argc, const char *argv[]) { MU_RUN_SUITE(test_suite); MU_REPORT(); return 0; }
#include <string.h> #include "lib/minunit.h" #include "acacia.h" #define TEST_KEY "abcdefghijklmnopqrstuvwxyz" #define TEST_VALUE "foo_bar_baz_111" MU_TEST(test_store_fetch_simple) { struct Node *cache = cache_init(); cache_set(TEST_KEY, TEST_VALUE, cache); mu_check(strcmp(cache_get(TEST_KEY, cache), TEST_VALUE) == 0); cache_close(cache); } MU_TEST(test_store_fetch_empty_string) { struct Node *cache = cache_init(); cache_set("foo", "", cache); mu_check(strcmp(cache_get("foo", cache), "") == 0); cache_close(cache); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_store_fetch_simple); MU_RUN_TEST(test_store_fetch_empty_string); } int main(int argc, const char *argv[]) { MU_RUN_SUITE(test_suite); MU_REPORT(); return 0; }
Add a test for caching an empty string
Add a test for caching an empty string
C
mit
zedr/acacia
3a04ce29a2d92f58ab07f83f4970c544e4afdf00
testsuite/tests/rts/exec_signals_prepare.c
testsuite/tests/rts/exec_signals_prepare.c
#include <signal.h> #include <stdio.h> #include <errno.h> #include <string.h> // Invokes a process, making sure that the state of the signal // handlers has all been set back to the unix default. int main(int argc, char **argv) { int i; sigset_t blockedsigs; struct sigaction action; // unblock all signals sigemptyset(&blockedsigs); sigprocmask(SIG_BLOCK, NULL, NULL); // reset all signals to SIG_DFL memset(&action, 0, sizeof(action)); action.sa_handler = SIG_DFL; action.sa_flags = 0; sigemptyset(&action.sa_mask); for(i = 0; i < NSIG; ++i) sigaction(i, &action, NULL); execv(argv[1], argv+1); fprintf(stderr, "failed to execv %s\n", argv[1]); return 0; }
#include <signal.h> #include <stdio.h> #include <errno.h> #include <string.h> #include <unistd.h> // Invokes a process, making sure that the state of the signal // handlers has all been set back to the unix default. int main(int argc, char **argv) { int i; sigset_t blockedsigs; struct sigaction action; // unblock all signals sigemptyset(&blockedsigs); sigprocmask(SIG_BLOCK, NULL, NULL); // reset all signals to SIG_DFL memset(&action, 0, sizeof(action)); action.sa_handler = SIG_DFL; action.sa_flags = 0; sigemptyset(&action.sa_mask); for(i = 0; i < NSIG; ++i) sigaction(i, &action, NULL); execv(argv[1], argv+1); fprintf(stderr, "failed to execv %s\n", argv[1]); return 0; }
Fix below warning by including "unistd.h" also
Fix below warning by including "unistd.h" also exec_signals_prepare.c:26:5: warning: implicit declaration of function 'execv' is invalid in C99 [-Wimplicit-function-declaration] execv(argv[1], argv+1); ^ 1 warning generated.
C
bsd-3-clause
vTurbine/ghc,sdiehl/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,nathyong/microghc-ghc,ryantm/ghc,urbanslug/ghc,jstolarek/ghc,sdiehl/ghc,TomMD/ghc,vTurbine/ghc,TomMD/ghc,snoyberg/ghc,sdiehl/ghc,spacekitteh/smcghc,jstolarek/ghc,jstolarek/ghc,ezyang/ghc,snoyberg/ghc,mcschroeder/ghc,lukexi/ghc,acowley/ghc,elieux/ghc,christiaanb/ghc,vTurbine/ghc,mcschroeder/ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,siddhanathan/ghc,vikraman/ghc,urbanslug/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,urbanslug/ghc,ml9951/ghc,gcampax/ghc,tjakway/ghcjvm,oldmanmike/ghc,gcampax/ghc,holzensp/ghc,da-x/ghc,wxwxwwxxx/ghc,bitemyapp/ghc,anton-dessiatov/ghc,green-haskell/ghc,gridaphobe/ghc,bitemyapp/ghc,olsner/ghc,gcampax/ghc,gridaphobe/ghc,AlexanderPankiv/ghc,sgillespie/ghc,mettekou/ghc,lukexi/ghc,shlevy/ghc,mettekou/ghc,holzensp/ghc,ezyang/ghc,olsner/ghc,ml9951/ghc,nushio3/ghc,shlevy/ghc,TomMD/ghc,fmthoma/ghc,vTurbine/ghc,vikraman/ghc,siddhanathan/ghc,lukexi/ghc,AlexanderPankiv/ghc,mcschroeder/ghc,sgillespie/ghc,bitemyapp/ghc,fmthoma/ghc,forked-upstream-packages-for-ghcjs/ghc,forked-upstream-packages-for-ghcjs/ghc,tjakway/ghcjvm,shlevy/ghc,urbanslug/ghc,mettekou/ghc,christiaanb/ghc,wxwxwwxxx/ghc,holzensp/ghc,nkaretnikov/ghc,ghc-android/ghc,nushio3/ghc,nkaretnikov/ghc,gridaphobe/ghc,AlexanderPankiv/ghc,ghc-android/ghc,bitemyapp/ghc,nathyong/microghc-ghc,gcampax/ghc,da-x/ghc,wxwxwwxxx/ghc,oldmanmike/ghc,wxwxwwxxx/ghc,sgillespie/ghc,ml9951/ghc,mfine/ghc,vikraman/ghc,nathyong/microghc-ghc,oldmanmike/ghc,olsner/ghc,acowley/ghc,tjakway/ghcjvm,elieux/ghc,forked-upstream-packages-for-ghcjs/ghc,AlexanderPankiv/ghc,spacekitteh/smcghc,wxwxwwxxx/ghc,TomMD/ghc,siddhanathan/ghc,gcampax/ghc,lukexi/ghc,ryantm/ghc,ryantm/ghc,nushio3/ghc,green-haskell/ghc,snoyberg/ghc,tibbe/ghc,gridaphobe/ghc,acowley/ghc,sdiehl/ghc,nathyong/microghc-ghc,ryantm/ghc,sdiehl/ghc,oldmanmike/ghc,tjakway/ghcjvm,nathyong/microghc-ghc,acowley/ghc,mfine/ghc,ghc-android/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,fmthoma/ghc,mcschroeder/ghc,ezyang/ghc,gridaphobe/ghc,ghc-android/ghc,urbanslug/ghc,ezyang/ghc,spacekitteh/smcghc,green-haskell/ghc,spacekitteh/smcghc,mcschroeder/ghc,tjakway/ghcjvm,christiaanb/ghc,nkaretnikov/ghc,ml9951/ghc,nushio3/ghc,frantisekfarka/ghc-dsi,green-haskell/ghc,ezyang/ghc,olsner/ghc,shlevy/ghc,oldmanmike/ghc,mfine/ghc,mettekou/ghc,frantisekfarka/ghc-dsi,bitemyapp/ghc,tibbe/ghc,christiaanb/ghc,siddhanathan/ghc,ghc-android/ghc,sgillespie/ghc,nushio3/ghc,tibbe/ghc,wxwxwwxxx/ghc,holzensp/ghc,gridaphobe/ghc,vikraman/ghc,sgillespie/ghc,tibbe/ghc,AlexanderPankiv/ghc,mfine/ghc,oldmanmike/ghc,ml9951/ghc,vikraman/ghc,anton-dessiatov/ghc,christiaanb/ghc,da-x/ghc,gridaphobe/ghc,sgillespie/ghc,TomMD/ghc,mettekou/ghc,vikraman/ghc,GaloisInc/halvm-ghc,elieux/ghc,forked-upstream-packages-for-ghcjs/ghc,mfine/ghc,nkaretnikov/ghc,tjakway/ghcjvm,frantisekfarka/ghc-dsi,gcampax/ghc,shlevy/ghc,olsner/ghc,mcschroeder/ghc,ml9951/ghc,christiaanb/ghc,ghc-android/ghc,ml9951/ghc,shlevy/ghc,nathyong/microghc-ghc,anton-dessiatov/ghc,tibbe/ghc,olsner/ghc,forked-upstream-packages-for-ghcjs/ghc,siddhanathan/ghc,urbanslug/ghc,shlevy/ghc,siddhanathan/ghc,mettekou/ghc,snoyberg/ghc,AlexanderPankiv/ghc,acowley/ghc,da-x/ghc,nkaretnikov/ghc,snoyberg/ghc,ezyang/ghc,mcschroeder/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,nkaretnikov/ghc,elieux/ghc,acowley/ghc,elieux/ghc,da-x/ghc,tjakway/ghcjvm,anton-dessiatov/ghc,mfine/ghc,acowley/ghc,da-x/ghc,green-haskell/ghc,gcampax/ghc,GaloisInc/halvm-ghc,christiaanb/ghc,olsner/ghc,mfine/ghc,anton-dessiatov/ghc,fmthoma/ghc,frantisekfarka/ghc-dsi,fmthoma/ghc,forked-upstream-packages-for-ghcjs/ghc,ml9951/ghc,da-x/ghc,fmthoma/ghc,sdiehl/ghc,nathyong/microghc-ghc,lukexi/ghc,siddhanathan/ghc,ezyang/ghc,nkaretnikov/ghc,sdiehl/ghc,anton-dessiatov/ghc,anton-dessiatov/ghc,elieux/ghc,holzensp/ghc,snoyberg/ghc,vTurbine/ghc,ryantm/ghc,mettekou/ghc,spacekitteh/smcghc,vTurbine/ghc,TomMD/ghc,urbanslug/ghc,sgillespie/ghc,snoyberg/ghc,nushio3/ghc,frantisekfarka/ghc-dsi,oldmanmike/ghc,ghc-android/ghc,vikraman/ghc,nushio3/ghc,jstolarek/ghc,AlexanderPankiv/ghc,jstolarek/ghc,TomMD/ghc
c1e92e075a259543719f7410290aeaffefe783b2
include/Map.h
include/Map.h
#ifndef LAND_H #define LAND_H #include <string> #include "Plant.h" class Land { public: ~Land(); const std::string getPlantName() const { return isStood_? plant_->getName() : "Empty"; } bool put(Plant & plant); bool getStood()const{return isStood_;} private: Plant * plant_ = nullptr; bool isStood_ = false; }; #endif // LAND_H #ifndef MAP_H #define MAP_H #include <vector> class Map { public: // with this constructor, you could get a map with [land_num] empty land Map(int land_num); Land operator[] (int i) { return lands_[i]; } const Land operator[] (int i) const { return lands_[i]; } int size() { return lands_.size(); } bool put(Plant & plant, int position) { return lands_[position].put(plant); } private: constexpr static int max_land_num = 10; std::vector<Land> lands_; }; #endif // MAP_H
#ifndef LAND_H #define LAND_H #include <string> #include "Plant.h" class Land { public: ~Land(); bool put(Plant & plant); bool getStood()const{return isStood_;} Plant & getPlant() { return *plant_; } const Plant & getPlant() const { return *plant_; } private: Plant * plant_ = nullptr; bool isStood_ = false; }; #endif // LAND_H #ifndef MAP_H #define MAP_H #include <vector> class Map { public: // with this constructor, you could get a map with [land_num] empty land Map(int land_num); Land operator[] (int i) { return lands_[i]; } const Land operator[] (int i) const { return lands_[i]; } int size() { return lands_.size(); } bool put(Plant & plant, int position) { return lands_[position].put(plant); } private: constexpr static int max_land_num = 10; std::vector<Land> lands_; }; #endif // MAP_H
Remove getPlantName metohod & Add getPlant mathod
Remove getPlantName metohod & Add getPlant mathod
C
mit
wi1d5ky/AP-Team-Project
b3f4c5d49830a8ef77ec1d74e8100fe3cc561230
include/api/ofp_odp_compat.h
include/api/ofp_odp_compat.h
/* Copyright (c) 2015, ENEA Software AB * Copyright (c) 2015, Nokia * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __OFP_ODP_COMPAT__ #define __OFP_ODP_COMPAT__ #if ODP_VERSION == 102 #include "linux.h" #else #include "odp/helper/linux.h" #endif /* odp_version == 102 */ #if ODP_VERSION < 105 typedef uint64_t odp_time_t; #endif /* ODP_VERSION < 105 */ #if ODP_VERSION < 104 && ODP_VERSION > 101 #define odp_cpumask_default_worker(cpumask, num_workers) odp_cpumask_def_worker(cpumask, num_workers) #elif ODP_VERSION < 102 #define odp_cpumask_default_worker(cpumask, num_workers) odp_cpumask_count(cpumask) #define ODP_THREAD_WORKER #define ODP_THREAD_CONTROL #endif #endif
/* Copyright (c) 2015, ENEA Software AB * Copyright (c) 2015, Nokia * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __OFP_ODP_COMPAT__ #define __OFP_ODP_COMPAT__ #if ODP_VERSION == 102 #include "linux.h" #else #include "odp/helper/linux.h" #endif /* odp_version == 102 */ #if ODP_VERSION < 105 typedef uint64_t odp_time_t; #endif /* ODP_VERSION < 105 */ #if ODP_VERSION < 104 && ODP_VERSION > 101 #define odp_cpumask_default_worker(cpumask, num_workers) odp_cpumask_def_worker(cpumask, num_workers) #elif ODP_VERSION < 102 #define odp_cpumask_default_worker(cpumask, num_workers) odp_cpumask_count(cpumask) #define odp_init_local(x) odp_init_local() #define ODP_THREAD_WORKER 0 #define ODP_THREAD_CONTROL 1 #endif #endif
Define ODP_THREAD_WORKER and ODP_THREAD_CONTROL as in it's original enum, instead of mangling them.
Define ODP_THREAD_WORKER and ODP_THREAD_CONTROL as in it's original enum, instead of mangling them. Defining odp_init_local like this we can initialized properly the values of ODP_THREAD_WORKER and ODP_THREAD_CONTROL. This is important for the following patch where we need to define odp_threat_type_t. Signed-off-by: José Pekkarinen <[email protected]> Reviewed-and-tested-by: Sorin Vultureanu <[email protected]>
C
bsd-3-clause
OpenFastPath/ofp,OpenFastPath/ofp,OpenFastPath/ofp,TolikH/ofp,TolikH/ofp,OpenFastPath/ofp,TolikH/ofp
00126c32c776459b75e5d2bfaba28bd261c1510a
h5py/api_compat.h
h5py/api_compat.h
/***** Preamble block ********************************************************* * * This file is part of h5py, a Python interface to the HDF5 library. * * http://www.h5py.org * * Copyright 2008-2013 Andrew Collette and contributors * * License: Standard 3-clause BSD; see "license.txt" for full license terms * and contributor agreement. * ****** End preamble block ****************************************************/ /* Contains compatibility macros and definitions for use by Cython code */ #ifndef H5PY_COMPAT #define H5PY_COMPAT #include <stddef.h> #include "Python.h" #include "numpy/arrayobject.h" #include "hdf5.h" /* The HOFFSET macro can't be used from Cython. */ #define h5py_size_n64 (sizeof(npy_complex64)) #define h5py_size_n128 (sizeof(npy_complex128)) #define h5py_offset_n64_real (HOFFSET(npy_complex64, real)) #define h5py_offset_n64_imag (HOFFSET(npy_complex64, imag)) #define h5py_offset_n128_real (HOFFSET(npy_complex128, real)) #define h5py_offset_n128_imag (HOFFSET(npy_complex128, imag)) #endif
/***** Preamble block ********************************************************* * * This file is part of h5py, a Python interface to the HDF5 library. * * http://www.h5py.org * * Copyright 2008-2013 Andrew Collette and contributors * * License: Standard 3-clause BSD; see "license.txt" for full license terms * and contributor agreement. * ****** End preamble block ****************************************************/ /* Contains compatibility macros and definitions for use by Cython code */ #ifndef H5PY_COMPAT #define H5PY_COMPAT #if (MPI_VERSION < 3) && !defined(PyMPI_HAVE_MPI_Message) typedef void *PyMPI_MPI_Message; #define MPI_Message PyMPI_MPI_Message #endif #include <stddef.h> #include "Python.h" #include "numpy/arrayobject.h" #include "hdf5.h" /* The HOFFSET macro can't be used from Cython. */ #define h5py_size_n64 (sizeof(npy_complex64)) #define h5py_size_n128 (sizeof(npy_complex128)) #define h5py_offset_n64_real (HOFFSET(npy_complex64, real)) #define h5py_offset_n64_imag (HOFFSET(npy_complex64, imag)) #define h5py_offset_n128_real (HOFFSET(npy_complex128, real)) #define h5py_offset_n128_imag (HOFFSET(npy_complex128, imag)) #endif
Add conditional definition of PyMPI_MPI_Message and MPI_Message PyMPI_MPI_Message. This is needed for MPI_VERSION<3 and a recent version of mpi4py.
Add conditional definition of PyMPI_MPI_Message and MPI_Message PyMPI_MPI_Message. This is needed for MPI_VERSION<3 and a recent version of mpi4py. Follows gh-401 https://groups.google.com/d/topic/h5py/Uw5x3BKwJGU/discussion and https://groups.google.com/d/topic/mpi4py/xnDyYvawB-Q/discussion.
C
bsd-3-clause
h5py/h5py,h5py/h5py,h5py/h5py
7a79b1da0c124fb642658c3698a38fdd9e77eb01
libc/string/strlcpy.c
libc/string/strlcpy.c
/* * Copyright (C) 2000-2005 Erik Andersen <[email protected]> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #define L_strlcpy #define Wstrlcpy __strlcpy #include "wstring.c" strong_alias(__strlcpy, strlcpy) #ifdef __LOCALE_C_ONLY weak_alias(strlcpy, strxfrm) #endif #undef L_strlcpy
/* * Copyright (C) 2000-2005 Erik Andersen <[email protected]> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #define L_strlcpy #define Wstrlcpy __strlcpy #include "wstring.c" strong_alias(__strlcpy, strlcpy) #ifdef __LOCALE_C_ONLY weak_alias(__strlcpy, __strxfrm) strong_alias(__strxfrm, strxfrm) #endif #undef L_strlcpy
Use correct syntax, correct weak/strong for [__]strxfrm
Use correct syntax, correct weak/strong for [__]strxfrm
C
lgpl-2.1
hjl-tools/uClibc,klee/klee-uclibc,ChickenRunjyd/klee-uclibc,kraj/uClibc,kraj/uclibc-ng,gittup/uClibc,groundwater/uClibc,waweber/uclibc-clang,ddcc/klee-uclibc-0.9.33.2,foss-xtensa/uClibc,ndmsystems/uClibc,mephi42/uClibc,waweber/uclibc-clang,majek/uclibc-vx32,hjl-tools/uClibc,waweber/uclibc-clang,kraj/uclibc-ng,atgreen/uClibc-moxie,ffainelli/uClibc,skristiansson/uClibc-or1k,foss-xtensa/uClibc,czankel/xtensa-uclibc,ffainelli/uClibc,hwoarang/uClibc,groundwater/uClibc,groundwater/uClibc,hjl-tools/uClibc,ChickenRunjyd/klee-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,ndmsystems/uClibc,groundwater/uClibc,ffainelli/uClibc,ChickenRunjyd/klee-uclibc,wbx-github/uclibc-ng,hwoarang/uClibc,ndmsystems/uClibc,atgreen/uClibc-moxie,gittup/uClibc,majek/uclibc-vx32,m-labs/uclibc-lm32,foss-for-synopsys-dwc-arc-processors/uClibc,ChickenRunjyd/klee-uclibc,brgl/uclibc-ng,skristiansson/uClibc-or1k,mephi42/uClibc,ddcc/klee-uclibc-0.9.33.2,brgl/uclibc-ng,kraj/uclibc-ng,klee/klee-uclibc,hjl-tools/uClibc,brgl/uclibc-ng,majek/uclibc-vx32,atgreen/uClibc-moxie,wbx-github/uclibc-ng,foss-xtensa/uClibc,czankel/xtensa-uclibc,foss-xtensa/uClibc,kraj/uClibc,OpenInkpot-archive/iplinux-uclibc,skristiansson/uClibc-or1k,OpenInkpot-archive/iplinux-uclibc,hwoarang/uClibc,kraj/uclibc-ng,czankel/xtensa-uclibc,majek/uclibc-vx32,gittup/uClibc,OpenInkpot-archive/iplinux-uclibc,mephi42/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,atgreen/uClibc-moxie,brgl/uclibc-ng,hwoarang/uClibc,wbx-github/uclibc-ng,m-labs/uclibc-lm32,ysat0/uClibc,ffainelli/uClibc,OpenInkpot-archive/iplinux-uclibc,ddcc/klee-uclibc-0.9.33.2,waweber/uclibc-clang,m-labs/uclibc-lm32,czankel/xtensa-uclibc,ndmsystems/uClibc,kraj/uClibc,m-labs/uclibc-lm32,hjl-tools/uClibc,ffainelli/uClibc,ysat0/uClibc,groundwater/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,skristiansson/uClibc-or1k,ysat0/uClibc,mephi42/uClibc,ddcc/klee-uclibc-0.9.33.2,klee/klee-uclibc,gittup/uClibc,klee/klee-uclibc,wbx-github/uclibc-ng,ysat0/uClibc,kraj/uClibc
3b4851ccd8e04b2db4127ced955cbfecb1e99786
libc/string/strlcpy.c
libc/string/strlcpy.c
/* * Copyright (C) 2000-2005 Erik Andersen <[email protected]> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #define L_strlcpy #define Wstrlcpy __strlcpy #include "wstring.c" strong_alias(__strlcpy, strlcpy) #ifdef __LOCALE_C_ONLY weak_alias(strlcpy, strxfrm) #endif #undef L_strlcpy
/* * Copyright (C) 2000-2005 Erik Andersen <[email protected]> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #define L_strlcpy #define Wstrlcpy __strlcpy #include "wstring.c" strong_alias(__strlcpy, strlcpy) #ifdef __LOCALE_C_ONLY weak_alias(__strlcpy, __strxfrm) strong_alias(__strxfrm, strxfrm) #endif #undef L_strlcpy
Use correct syntax, correct weak/strong for [__]strxfrm
Use correct syntax, correct weak/strong for [__]strxfrm
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
e44bcd18b20baba5fa95000415440f83c36a9599
libk/src/hook/fcntl.c
libk/src/hook/fcntl.c
#include <fcntl.h> #include <k/sys.h> int open(const char *path, int oflag, ...) { return MAKE_SYSCALL(open, path, oflag); } int fcntl(int fildes, int cmd, ...) { //FIXME for bash return MAKE_SYSCALL(unimplemented, "fcntl", false); }
#include <fcntl.h> #include <stdarg.h> #include <k/sys.h> int open(const char *path, int oflag, ...) { int mode = 0; if(oflag & O_CREAT) { va_list va; va_start(va, oflag); mode = va_arg(va, int); va_end(va); } return MAKE_SYSCALL(open, path, oflag, mode); } int fcntl(int fildes, int cmd, ...) { //FIXME for bash return MAKE_SYSCALL(unimplemented, "fcntl", false); }
Fix open() syscall in libk
Fix open() syscall in libk
C
bsd-2-clause
escortkeel/k-os,escortkeel/k-os,escortkeel/k-os
227a2bd5dc57ee93bf4b4ea9e3a2c8837e629f51
brightray/browser/mac/cocoa_notification.h
brightray/browser/mac/cocoa_notification.h
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_ #define BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_ #import <Foundation/Foundation.h> #include <string> #include "base/mac/scoped_nsobject.h" #include "brightray/browser/notification.h" namespace brightray { class CocoaNotification : public Notification { public: CocoaNotification(NotificationDelegate* delegate, NotificationPresenter* presenter); ~CocoaNotification(); // Notification: void Show(const base::string16& title, const base::string16& msg, const std::string& tag, const GURL& icon_url, const SkBitmap& icon, bool silent, const bool has_reply, const base::string16 reply_placeholder) override; void Dismiss() override; void NotificationDisplayed(); void NotificationReplied(const std::string reply); NSUserNotification* notification() const { return notification_; } private: base::scoped_nsobject<NSUserNotification> notification_; DISALLOW_COPY_AND_ASSIGN(CocoaNotification); }; } // namespace brightray #endif // BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_ #define BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_ #import <Foundation/Foundation.h> #include <string> #include "base/mac/scoped_nsobject.h" #include "brightray/browser/notification.h" namespace brightray { class CocoaNotification : public Notification { public: CocoaNotification(NotificationDelegate* delegate, NotificationPresenter* presenter); ~CocoaNotification(); // Notification: void Show(const base::string16& title, const base::string16& msg, const std::string& tag, const GURL& icon_url, const SkBitmap& icon, bool silent, const bool has_reply, const base::string16& reply_placeholder) override; void Dismiss() override; void NotificationDisplayed(); void NotificationReplied(const std::string reply); NSUserNotification* notification() const { return notification_; } private: base::scoped_nsobject<NSUserNotification> notification_; DISALLOW_COPY_AND_ASSIGN(CocoaNotification); }; } // namespace brightray #endif // BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_
Fix reference typed reply placeholder
Fix reference typed reply placeholder
C
mit
bpasero/electron,thomsonreuters/electron,gerhardberger/electron,the-ress/electron,thomsonreuters/electron,gerhardberger/electron,wan-qy/electron,renaesop/electron,seanchas116/electron,tonyganch/electron,electron/electron,wan-qy/electron,the-ress/electron,thomsonreuters/electron,electron/electron,gerhardberger/electron,Floato/electron,bpasero/electron,electron/electron,renaesop/electron,the-ress/electron,seanchas116/electron,gerhardberger/electron,bpasero/electron,thomsonreuters/electron,gerhardberger/electron,electron/electron,wan-qy/electron,Floato/electron,wan-qy/electron,seanchas116/electron,electron/electron,shiftkey/electron,seanchas116/electron,the-ress/electron,the-ress/electron,renaesop/electron,shiftkey/electron,wan-qy/electron,electron/electron,bpasero/electron,seanchas116/electron,bpasero/electron,tonyganch/electron,tonyganch/electron,tonyganch/electron,shiftkey/electron,shiftkey/electron,seanchas116/electron,shiftkey/electron,thomsonreuters/electron,Floato/electron,wan-qy/electron,renaesop/electron,Floato/electron,shiftkey/electron,gerhardberger/electron,Floato/electron,Floato/electron,the-ress/electron,tonyganch/electron,gerhardberger/electron,renaesop/electron,bpasero/electron,bpasero/electron,renaesop/electron,the-ress/electron,electron/electron,tonyganch/electron,thomsonreuters/electron
858230f4528ad2f418f97414e3a8be46865c367c
include/math_defs.h
include/math_defs.h
#ifndef AL_MATH_DEFS_H #define AL_MATH_DEFS_H #define F_PI (3.14159265358979323846f) #define F_PI_2 (1.57079632679489661923f) #define F_TAU (6.28318530717958647692f) #ifndef FLT_EPSILON #define FLT_EPSILON (1.19209290e-07f) #endif #define DEG2RAD(x) ((ALfloat)(x) * (F_PI/180.0f)) #define RAD2DEG(x) ((ALfloat)(x) * (180.0f/F_PI)) #endif /* AL_MATH_DEFS_H */
#ifndef AL_MATH_DEFS_H #define AL_MATH_DEFS_H #ifdef HAVE_FLOAT_H #include <float.h> #endif #define F_PI (3.14159265358979323846f) #define F_PI_2 (1.57079632679489661923f) #define F_TAU (6.28318530717958647692f) #ifndef FLT_EPSILON #define FLT_EPSILON (1.19209290e-07f) #endif #define DEG2RAD(x) ((ALfloat)(x) * (F_PI/180.0f)) #define RAD2DEG(x) ((ALfloat)(x) * (180.0f/F_PI)) #endif /* AL_MATH_DEFS_H */
Include float.h if present before defining math stuff
Include float.h if present before defining math stuff
C
lgpl-2.1
aaronmjacobs/openal-soft,alexxvk/openal-soft,alexxvk/openal-soft,aaronmjacobs/openal-soft
f7036947f47d7467af288fcc5523e88e21693207
lib/lh5_decoder.h
lib/lh5_decoder.h
/* Copyright (c) 2011, Simon Howard Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS 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, DIRECT, 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. */ #ifndef LHASA_LHA_LH5_DECODER_H #define LHASA_LHA_LH5_DECODER_H #include "lha_decoder.h" extern LHADecoderType lha_lh5_decoder; #endif /* #ifndef LHASA_LHA_LH5_DECODER_H */
Add missing header for -lh5- decoder.
Add missing header for -lh5- decoder.
C
isc
fragglet/lhasa,fragglet/lhasa,fragglet/lhasa
43d02e8878a075f2affa41f972c0088ee93f6e8e
lib/haka/regexp_module.c
lib/haka/regexp_module.c
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <haka/error.h> #include <haka/regexp_module.h> struct regexp_module *regexp_module_load(const char *module_name, struct parameters *args) { struct module *module = module_load(module_name, args); if (module == NULL || module->type != MODULE_REGEXP) { if (module != NULL) module_release(module); error(L"Module %s is not of type MODULE_REGEXP", module_name); return NULL; } return (struct regexp_module *)module; } void regexp_module_release(struct regexp_module *module) { module_release((struct module *)module); }
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <haka/error.h> #include <haka/regexp_module.h> struct regexp_module *regexp_module_load(const char *module_name, struct parameters *args) { struct module *module = module_load(module_name, args); if (module == NULL || module->type != MODULE_REGEXP) { if (module != NULL) module_release(module); error(L"Module %s is not of type MODULE_REGEXP", module_name); return NULL; } return (struct regexp_module *)module; } void regexp_module_release(struct regexp_module *module) { module_release(&module->module); }
Replace cast by safer access
Replace cast by safer access
C
mpl-2.0
nabilbendafi/haka,haka-security/haka,lcheylus/haka,nabilbendafi/haka,LubyRuffy/haka,Wingless-Archangel/haka,lcheylus/haka,haka-security/haka,haka-security/haka,Wingless-Archangel/haka,nabilbendafi/haka,LubyRuffy/haka,lcheylus/haka
3fdc17f34aed6c08c6803dd91db59dc2971df9b6
add.c
add.c
#include "cx/fileb.h" static real sum_line (FileB* f) { real x = 0, y = 0; while (load_real_FileB (f, &y)) x += y; return x; } int main () { DecloStack( FileB, f ); FILE* in = stdin; FILE* out = stdout; init_FileB (f); f->f = in; f->byline = true; while (getline_FileB (f)) { FileB olay; real x; olay_FileB (&olay, f); x = sum_line (&olay); fprintf (out, "%f\n", x); fflush (out); } return 0; }
#include "cx/fileb.h" static real sum_line (FileB* f) { real x = 0, y = 0; while (load_real_FileB (f, &y)) x += y; f->good = true; skipds_FileB (f, 0); if (cstr_FileB (f) [0] != '\0') fputs ("Line is no good!\n", stderr); return x; } int main () { DecloStack( FileB, f ); FILE* in = stdin; FILE* out = stdout; init_FileB (f); f->f = in; f->byline = true; while (getline_FileB (f)) { FileB olay; real x; olay_FileB (&olay, f); x = sum_line (&olay); fprintf (out, "%f\n", x); fflush (out); } return 0; }
Add utility gives a warning on bad parse
Add utility gives a warning on bad parse
C
isc
grencez/lace,grencez/lace
57617193daeecc6ec6adf1057dbd687464558259
demo1/src/demo/object/itickable.h
demo1/src/demo/object/itickable.h
// itickable.h // // Interface definition of an object that is updated during the tick cycle. // #ifndef DEMO_ITICKABLE_H #define DEMO_ITICKABLE_H namespace demo { namespace obj { class ITickable { public: // CONSTRUCTORS ~ITickable(); // MEMBER FUNCTIONS /** * Prepare for the next tick cycle. */ virtual void preTick() = 0; /** * Update the object. * @param dt The elapsed time. */ virtual void tick( float dt ) = 0; /** * Clean up after the tick cycle. */ virtual void postTick() = 0; }; // CONSTRUCTORS ITickable::~ITickable() { } } // End nspc obj } // End nspc demo #endif // DEMO_ITICKABLE_H
// itickable.h // // Interface definition of an object that is updated during the tick cycle. // #ifndef DEMO_ITICKABLE_H #define DEMO_ITICKABLE_H namespace demo { namespace obj { class ITickable { public: // CONSTRUCTORS /** * Destruct the tickable. */ ~ITickable(); // MEMBER FUNCTIONS /** * Prepare for the next tick cycle. */ virtual void preTick() = 0; /** * Update the object. * @param dt The elapsed time in seconds. */ virtual void tick( float dt ) = 0; /** * Clean up after the tick cycle. */ virtual void postTick() = 0; }; // CONSTRUCTORS inline ITickable::~ITickable() { } } // End nspc obj } // End nspc demo #endif // DEMO_ITICKABLE_H
Clean up the tickable definition.
Clean up the tickable definition.
C
mit
invaderjon/demo,invaderjon/demo
040f741c3387244091f24f7232ee85485b77f1f3
Source/HYPScatterPlot.h
Source/HYPScatterPlot.h
@import UIKit; @protocol HYPScatterPlotDataSource; @class HYPScatterPoint; @class HYPScatterLabel; @interface HYPScatterPlot : UIView @property (nonatomic) UIColor *averageLineColor; @property (nonatomic) UIColor *xAxisColor; @property (nonatomic) UIColor *yAxisMidGradient; @property (nonatomic) UIColor *yAxisEndGradient; @property (nonatomic, weak) id<HYPScatterPlotDataSource> dataSource; @end @protocol HYPScatterPlotDataSource <NSObject> @required - (NSArray *)scatterPointsForScatterPlot:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)maximumXValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)minimumXValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)maximumYValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)minimumYValue:(HYPScatterPlot *)scatterPlot; @optional - (CGFloat)averageYValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)minimumYLabel:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)maximumYLabel:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)minimumXLabel:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)maximumXLabel:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)averageLabel:(HYPScatterPlot *)scatterPlot; @end
@import UIKit; @protocol HYPScatterPlotDataSource; @class HYPScatterPoint; @class HYPScatterLabel; @interface HYPScatterPlot : UIView @property (nonatomic) UIColor *averageLineColor; @property (nonatomic) UIColor *xAxisColor; @property (nonatomic) UIColor *yAxisMidGradient; @property (nonatomic) UIColor *yAxisEndGradient; @property (nonatomic, weak) id<HYPScatterPlotDataSource> dataSource; @end @protocol HYPScatterPlotDataSource <NSObject> @required /** @return should be a list of HYPScatterPoint objects */ - (NSArray *)scatterPointsForScatterPlot:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)maximumXValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)minimumXValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)maximumYValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)minimumYValue:(HYPScatterPlot *)scatterPlot; @optional - (CGFloat)averageYValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)minimumYLabel:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)maximumYLabel:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)minimumXLabel:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)maximumXLabel:(HYPScatterPlot *)scatterPlot; - (HYPScatterLabel *)averageLabel:(HYPScatterPlot *)scatterPlot; @end
Add an important info. for scatter datasource
Add an important info. for scatter datasource
C
mit
hyperoslo/Scatter
79e3842130d52a70d1f134edf055612220b77bdc
flash_writer.h
flash_writer.h
#ifndef FLASH_WRITER_H #define FLASH_WRITER_H #include <stdint.h> #include <stddef.h> /** Unlocks the flash for programming. */ void flash_writer_unlock(void); /** Locks the flash */ void flash_writer_lock(void); /** Erases the flash page at given address. */ void flash_writer_page_erase(void *page); /** Writes data to given location in flash. */ void flash_writer_page_write(void *page, uint8_t *data, size_t len); #endif /* FLASH_WRITER_H */
#ifndef FLASH_WRITER_H #define FLASH_WRITER_H #include <stdint.h> #include <stddef.h> #ifdef __cplusplus extern "C" { #endif /** Unlocks the flash for programming. */ void flash_writer_unlock(void); /** Locks the flash */ void flash_writer_lock(void); /** Erases the flash page at given address. */ void flash_writer_page_erase(void *page); /** Writes data to given location in flash. */ void flash_writer_page_write(void *page, uint8_t *data, size_t len); #ifdef __cplusplus } #endif #endif /* FLASH_WRITER_H */
Add missing extern "C" statements
Add missing extern "C" statements
C
bsd-2-clause
cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader
d4a07988c8ba6b214e8d93c3a4048357484ba771
test/Analysis/stack-addr-ps.c
test/Analysis/stack-addr-ps.c
// RUN: clang -checker-simple -verify %s int* f1() { int x = 0; return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}} } int* f2(int y) { return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}} } int* f3(int x, int *y) { int w = 0; if (x) y = &w; return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}} } unsigned short* compound_literal() { return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}} }
// RUN: clang -checker-simple -verify %s int* f1() { int x = 0; return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}} } int* f2(int y) { return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}} } int* f3(int x, int *y) { int w = 0; if (x) y = &w; return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}} } void* compound_literal(int x) { if (x) return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}} struct s { int z; double y; int w; }; return &((struct s){ 2, 0.4, 5 * 8 }); }
Improve compound literal test case.
Improve compound literal test case. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58447 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
a9faab2fa55c45a9886d59c2367a498e8018227f
mainwindow.h
mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); private slots: void on_enableSizeButton_clicked(); private: Ui::MainWindow *ui; double **xnPlus, **xnMinus, **ynPlus, **ynMinus; double alpha, beta, epsilon, lyambda, fi; double tau, n; private: void initArrays(); void initTauComboBox(); void initQwtPlot(); double func1(double xn, double yn); double func2(double xn); void buildTrajectory(int numTraj); }; #endif // MAINWINDOW_H
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); private slots: void on_enableSizeButton_clicked(); private: Ui::MainWindow *ui; double **xnPlus, **xnMinus, **ynPlus, **ynMinus; private: void initArrays(); void initTauComboBox(); void initQwtPlot(); double func1(double xn, double yn); double func2(double xn); void buildTrajectory(int numTraj); }; #endif // MAINWINDOW_H
Remove unnecessary fields in class.
Remove unnecessary fields in class.
C
mit
ivanshchitov/solving-system-ode
9698919d35fe7ffdc9e4e4e88de50692d115be10
Sources/include/HTMLNode+Private.h
Sources/include/HTMLNode+Private.h
// // HTMLNode+Private.h // HTMLKit // // Created by Iska on 20/12/15. // Copyright © 2015 BrainCookie. All rights reserved. // ///------------------------------------------------------ /// HTMLKit private header ///------------------------------------------------------ #import <HTMLKit/HTMLKit.h> /** Private HTML Node methods which are not intended for public API. */ @interface HTMLNode () /** A read-write redeclaration of the same property in the public API. */ @property (nonatomic, weak) HTMLDocument *ownerDocument; /** A read-write redeclaration of the same property in the public API. */ @property (nonatomic, weak) HTMLNode *parentNode; /** Designated initializer of the HTML Node, which, however, should not be used directly. It is intended to be called only by subclasses. @abstract Use concrete subclasses of the HTML Node. @param name The node's name. @param type The node's type. @return A new instance of a HTML Node. */ - (instancetype)initWithName:(NSString *)name type:(HTMLNodeType)type NS_DESIGNATED_INITIALIZER; /** Casts this node to a HTML Element. This cast should only be performed after the appropriate check. */ - (HTMLElement *)asElement; /** Returns the same string representation of the DOM tree rooted at this node that is used by html5lib-tests. @disucssion This method is indended for testing purposes. */ - (NSString *)treeDescription; @end
// // HTMLNode+Private.h // HTMLKit // // Created by Iska on 20/12/15. // Copyright © 2015 BrainCookie. All rights reserved. // ///------------------------------------------------------ /// HTMLKit private header ///------------------------------------------------------ #import "HTMLNode.h" /** Private HTML Node methods which are not intended for public API. */ @interface HTMLNode () /** A read-write redeclaration of the same property in the public API. */ @property (nonatomic, weak) HTMLDocument *ownerDocument; /** A read-write redeclaration of the same property in the public API. */ @property (nonatomic, weak) HTMLNode *parentNode; /** Designated initializer of the HTML Node, which, however, should not be used directly. It is intended to be called only by subclasses. @abstract Use concrete subclasses of the HTML Node. @param name The node's name. @param type The node's type. @return A new instance of a HTML Node. */ - (instancetype)initWithName:(NSString *)name type:(HTMLNodeType)type NS_DESIGNATED_INITIALIZER; /** Casts this node to a HTML Element. This cast should only be performed after the appropriate check. */ - (HTMLElement *)asElement; /** Returns the same string representation of the DOM tree rooted at this node that is used by html5lib-tests. @disucssion This method is indended for testing purposes. */ - (NSString *)treeDescription; @end
Fix import in private HTMLNode header
Fix import in private HTMLNode header
C
mit
iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit
5e9b10290a20a4d141e6db96a2f4b767ad5077ea
src/SGFeature.h
src/SGFeature.h
// // SGFeature.h // SimpleGeo // // Created by Seth Fitzsimmons on 11/14/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import "SGPoint.h" @interface SGFeature : NSObject { NSString* featureId; SGPoint* geometry; NSDictionary* properties; NSString* rawBody; } @property (readonly) NSString* featureId; @property (readonly) SGPoint* geometry; @property (readonly) NSDictionary* properties; @property (readonly) NSString* rawBody; + (SGFeature *)featureWithId:(NSString *)id; + (SGFeature *)featureWithId:(NSString *)id data:(NSDictionary *)data; + (SGFeature *)featureWithId:(NSString *)id data:(NSDictionary *)data rawBody:(NSString *)rawBody; + (SGFeature *)featureWithData:(NSDictionary *)data; - (id)initWithId:(NSString *)id; - (id)initWithId:(NSString *)id data:(NSDictionary *)data; - (id)initWithId:(NSString *)id data:(NSDictionary *)data rawBody:(NSString *)rawBody; @end
// // SGFeature.h // SimpleGeo // // Created by Seth Fitzsimmons on 11/14/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import "SGPoint.h" @interface SGFeature : NSObject { NSString* featureId; SGPoint* geometry; NSDictionary* properties; NSString* rawBody; } @property (retain,readonly) NSString* featureId; @property (retain,readonly) SGPoint* geometry; @property (retain,readonly) NSDictionary* properties; @property (retain,readonly) NSString* rawBody; + (SGFeature *)featureWithId:(NSString *)id; + (SGFeature *)featureWithId:(NSString *)id data:(NSDictionary *)data; + (SGFeature *)featureWithId:(NSString *)id data:(NSDictionary *)data rawBody:(NSString *)rawBody; + (SGFeature *)featureWithData:(NSDictionary *)data; - (id)initWithId:(NSString *)id; - (id)initWithId:(NSString *)id data:(NSDictionary *)data; - (id)initWithId:(NSString *)id data:(NSDictionary *)data rawBody:(NSString *)rawBody; @end
Revert "No reason for readonly properties to be retained"
Revert "No reason for readonly properties to be retained" This reverts commit eeed3d87ea740ab73995af2de8f044e3a9a3082d.
C
bsd-3-clause
simplegeo/SimpleGeo.framework,simplegeo/SimpleGeo.framework,simplegeo/SimpleGeo.framework
c3afaa342f30aded4270e96254cf0729058e06e8
trie.c
trie.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <util.h> #include "trie.h" #define char_index(c) c - 97 trie * trie_init(void) { trie *t = emalloc(sizeof(*t)); memset(t, 0, sizeof(*t)); t->children = emalloc(R_SIZE * sizeof(*(t->children))); memset(t->children, 0, sizeof(*(t->children))); return t; } void trie_insert(trie *t, const char *key, size_t value) { const char *c = key; trie *cur_node = t; while (*c) { if (cur_node->children[char_index(*c)] == NULL) cur_node->children[char_index(*c)] = trie_init(); cur_node = cur_node->children[char_index(*c)]; c++; } cur_node->count = value; } size_t trie_get(trie *t, const char *key) { const char *c = key; trie *cur_node = t; while (*c) { if (cur_node->children[char_index(*c)] == NULL) return 0; cur_node = cur_node->children[char_index(*c)]; c++; } return cur_node->count; }
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <util.h> #include "trie.h" #define char_index(c) c - 97 trie * trie_init(void) { trie *t = emalloc(sizeof(*t)); memset(t, 0, sizeof(*t)); t->children = ecalloc(R_SIZE, sizeof(*(t->children))); return t; } void trie_insert(trie *t, const char *key, size_t value) { const char *c = key; trie *cur_node = t; while (*c) { if (cur_node->children[char_index(*c)] == NULL) cur_node->children[char_index(*c)] = trie_init(); cur_node = cur_node->children[char_index(*c)]; c++; } cur_node->count = value; } size_t trie_get(trie *t, const char *key) { const char *c = key; trie *cur_node = t; while (*c) { if (cur_node->children[char_index(*c)] == NULL) return 0; cur_node = cur_node->children[char_index(*c)]; c++; } return cur_node->count; }
Replace malloc + memset with calloc
Replace malloc + memset with calloc
C
bsd-2-clause
abhinav-upadhyay/nbspell,abhinav-upadhyay/nbspell
a1556864e486f61c4bf974f5a5595ee4511977b1
src/util/util_version.h
src/util/util_version.h
/* * Copyright 2011-2016 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __UTIL_VERSION_H__ #define __UTIL_VERSION_H__ /* Cycles version number */ CCL_NAMESPACE_BEGIN #define CYCLES_VERSION_MAJOR 1 #define CYCLES_VERSION_MINOR 10 #define CYCLES_VERSION_PATCH 0 #define CYCLES_MAKE_VERSION_STRING2(a, b, c) #a "." #b "." #c #define CYCLES_MAKE_VERSION_STRING(a, b, c) CYCLES_MAKE_VERSION_STRING2(a, b, c) #define CYCLES_VERSION_STRING \ CYCLES_MAKE_VERSION_STRING(CYCLES_VERSION_MAJOR, CYCLES_VERSION_MINOR, CYCLES_VERSION_PATCH) CCL_NAMESPACE_END #endif /* __UTIL_VERSION_H__ */
/* * Copyright 2011-2016 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __UTIL_VERSION_H__ #define __UTIL_VERSION_H__ /* Cycles version number */ CCL_NAMESPACE_BEGIN #define CYCLES_VERSION_MAJOR 1 #define CYCLES_VERSION_MINOR 11 #define CYCLES_VERSION_PATCH 0 #define CYCLES_MAKE_VERSION_STRING2(a, b, c) #a "." #b "." #c #define CYCLES_MAKE_VERSION_STRING(a, b, c) CYCLES_MAKE_VERSION_STRING2(a, b, c) #define CYCLES_VERSION_STRING \ CYCLES_MAKE_VERSION_STRING(CYCLES_VERSION_MAJOR, CYCLES_VERSION_MINOR, CYCLES_VERSION_PATCH) CCL_NAMESPACE_END #endif /* __UTIL_VERSION_H__ */
Bump Cycles version to 1.11.0 (Blender 2.81)
Bump Cycles version to 1.11.0 (Blender 2.81)
C
apache-2.0
tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird
d099ccc83b7cb2a7809708722f515c5e091293df
chrome/browser/cocoa/objc_zombie.h
chrome/browser/cocoa/objc_zombie.h
// Copyright (c) 2010 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_COCOA_NSOBJECT_ZOMBIE_H_ #define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_ #pragma once #import <Foundation/Foundation.h> // You should think twice every single time you use anything from this // namespace. namespace ObjcEvilDoers { // Enable zombies. Returns NO if it fails to enable. // // When |zombieAllObjects| is YES, all objects inheriting from // NSObject become zombies on -dealloc. If NO, -shouldBecomeCrZombie // is queried to determine whether to make the object a zombie. // // |zombieCount| controls how many zombies to store before freeing the // oldest. Set to 0 to free objects immediately after making them // zombies. BOOL ZombieEnable(BOOL zombieAllObjects, size_t zombieCount); // Disable zombies. void ZombieDisable(); } // namespace ObjcEvilDoers @interface NSObject (CrZombie) - (BOOL)shouldBecomeCrZombie; @end #endif // CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
// Copyright (c) 2010 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_COCOA_NSOBJECT_ZOMBIE_H_ #define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_ #pragma once #import <Foundation/Foundation.h> // You should think twice every single time you use anything from this // namespace. namespace ObjcEvilDoers { // Enable zombie object debugging. This implements a variant of Apple's // NSZombieEnabled which can help expose use-after-free errors where messages // are sent to freed Objective-C objects in production builds. // // Returns NO if it fails to enable. // // When |zombieAllObjects| is YES, all objects inheriting from // NSObject become zombies on -dealloc. If NO, -shouldBecomeCrZombie // is queried to determine whether to make the object a zombie. // // |zombieCount| controls how many zombies to store before freeing the // oldest. Set to 0 to free objects immediately after making them // zombies. BOOL ZombieEnable(BOOL zombieAllObjects, size_t zombieCount); // Disable zombies. void ZombieDisable(); } // namespace ObjcEvilDoers @interface NSObject (CrZombie) - (BOOL)shouldBecomeCrZombie; @end #endif // CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
Add link to explanation of what we mean by zombie The person triaging / debugging a zombie crash may never have heard of this before.
Add link to explanation of what we mean by zombie The person triaging / debugging a zombie crash may never have heard of this before. BUG=None TEST=None Review URL: http://codereview.chromium.org/3763002 git-svn-id: http://src.chromium.org/svn/trunk/src@62723 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: afedf4fa79fedacfcd285d49f1c044ddd138951e
C
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser
27b36d361060857849880209794c6f6f98457bfe
csapex_ros/src/ros_boot.h
csapex_ros/src/ros_boot.h
#ifndef ROS_BOOT_H #define ROS_BOOT_H /// PROJECT #include <csapex/core/bootstrap_plugin.h> #include <csapex/core/core_fwd.h> #include <csapex/model/model_fwd.h> #include <csapex/msg/msg_fwd.h> #include <csapex/view/view_fwd.h> /// SYSTEM // clang-format off #include <csapex/utility/suppress_warnings_start.h> #include <pluginlib/class_loader.hpp> #include <csapex/utility/suppress_warnings_end.h> // clang-format on namespace csapex { class RosBoot : public BootstrapPlugin { public: RosBoot(); void boot(csapex::PluginLocator* locator); private: std::vector<std::string> valid_plugin_xml_files_; pluginlib::ClassLoader<CorePlugin> loader_core_; pluginlib::ClassLoader<MessageProvider> loader_msg_; pluginlib::ClassLoader<MessageRenderer> loader_msg_renderer_; pluginlib::ClassLoader<Node> loader_node_; pluginlib::ClassLoader<NodeAdapterBuilder> loader_node_adapter_; pluginlib::ClassLoader<ParameterAdapterBuilder> loader_param_adapter_; pluginlib::ClassLoader<DragIOHandler> loader_drag_io_; }; } // namespace csapex #endif // ROS_BOOT_H
#ifndef ROS_BOOT_H #define ROS_BOOT_H /// PROJECT #include <csapex/core/bootstrap_plugin.h> #include <csapex/core/core_fwd.h> #include <csapex/model/model_fwd.h> #include <csapex/msg/msg_fwd.h> #include <csapex/view/view_fwd.h> /// SYSTEM // clang-format off #include <csapex/utility/suppress_warnings_start.h> #if CLASS_LOADER_USES_HPP #include <pluginlib/class_loader.hpp> #else #include <pluginlib/class_loader.h> #endif #include <csapex/utility/suppress_warnings_end.h> // clang-format on namespace csapex { class RosBoot : public BootstrapPlugin { public: RosBoot(); void boot(csapex::PluginLocator* locator); private: std::vector<std::string> valid_plugin_xml_files_; pluginlib::ClassLoader<CorePlugin> loader_core_; pluginlib::ClassLoader<MessageProvider> loader_msg_; pluginlib::ClassLoader<MessageRenderer> loader_msg_renderer_; pluginlib::ClassLoader<Node> loader_node_; pluginlib::ClassLoader<NodeAdapterBuilder> loader_node_adapter_; pluginlib::ClassLoader<ParameterAdapterBuilder> loader_param_adapter_; pluginlib::ClassLoader<DragIOHandler> loader_drag_io_; }; } // namespace csapex #endif // ROS_BOOT_H
Fix jade version of class_loader not containing class_loader.hpp
Fix jade version of class_loader not containing class_loader.hpp
C
bsd-3-clause
cogsys-tuebingen/csapex_core_plugins,cogsys-tuebingen/csapex_core_plugins,cogsys-tuebingen/csapex_core_plugins
eaaf1b668cc99633072ac6c63d2db9dee03fbef5
server/gwkv_ht_wrapper.h
server/gwkv_ht_wrapper.h
#ifndef GWKV_HT_WRAPPER #define GWKV_HT_WRAPPER #include <stdlib.h> #include "../hashtable/hashtable.h" /* Operations the table supports */ typedef enum { GET, SET } method; /* Defines for result codes */ #define STORED 0 #define NOT_STORED 1 #define EXISTS 2 #define NOT_FOUND 3 /* Datatype for wrapping datastore values */ struct { method method_type, const char* key, size_t key_length, const char* value, size_t value_length } operation; /** * Wrapper function to set a value in the hashtable * Returns either STORED or NOT_STORED (defined above) */ int gwkv_server_set (memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length); /** * Wrapper function to read a value from the hashtable * Returns the data if sucessful, or NULL on error * These correspond to the EXISTS and NOT_FOUND codes above */ char* gwkv_server_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length); #endif
#ifndef GWKV_HT_WRAPPER #define GWKV_HT_WRAPPER #include <stdlib.h> #include "../hashtable/hashtable.h" /* Types of hashing algorithms we support */ typedef enum { MD5 } hash_type; /* All encompassing datatype for server datastore */ struct { ht* hashtable, hash_type hash } gwkv_server; /* Operations the table supports */ typedef enum { GET, SET } method; /* Defines for result codes */ #define STORED 0 #define NOT_STORED 1 #define EXISTS 2 #define NOT_FOUND 3 /* Datatype for wrapping datastore values */ struct { method method_type, const char* key, size_t key_length, const char* value, size_t value_length } operation; /* Initialize a new key/value datastore */ gwkv_server* gwkv_server_init(hash_type hash_algorithm); /** * Wrapper function to set a value in the hashtable * Returns either STORED or NOT_STORED (defined above) */ int gwkv_server_set (memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length); /** * Wrapper function to read a value from the hashtable * Returns the data if sucessful, or NULL on error * These correspond to the EXISTS and NOT_FOUND codes above */ char* gwkv_server_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length); /* Frees all memory associated with the datastore */ void gwkv_server_free(gwkv_server* server); #endif
Add struct to keep datastore things
Add struct to keep datastore things
C
mit
gwAdvNet2015/gw-kv-store
e9a50022c0fd0f5ca60fd12c542ba9bbdfda7606
src/docs.h
src/docs.h
static const char *docs_usage[] = { "usage enchive [-p|--pubkey <file>] [-s|--seckey <file>]", #if ENCHIVE_OPTION_AGENT " [-a|--agent[=seconds]] [-A|--no-agent]", #endif " [--version] [--help]", " <command> [args]", "", "Commands (unique prefixes accepted):", " keygen generate a new master keypair", " archive archive using the public key", " extract extract from an archive using the secret key", " fingerprint print the master keypair fingerprint", "", " -p, --pubkey <file> set the public key file [~/.enchive.pub]", " -s, --seckey <file> set the secret key file [~/.enchive.sec]", #if ENCHIVE_OPTION_AGENT " -a, --agent[=seconds] run key agent after reading a passphrase [" STR(ENCHIVE_AGENT_TIMEOUT) "]", " -A, --no-agent don't run the key agent" # if ENCHIVE_AGENT_DEFAULT_ENABLED "", # else " (default)", # endif #endif " --version display version information", " --help display this usage information", "", "Enchive archives files by encrypting them to yourself using your", "public key. It uses ChaCha20, Curve25519, and HMAC-SHA256.", 0};
static const char *docs_usage[] = { "usage enchive [-p|--pubkey <file>] [-s|--seckey <file>]", #if ENCHIVE_OPTION_AGENT " [-a|--agent[=seconds]] [-A|--no-agent]", #endif " [--version] [--help]", " <command> [args]", "", "Commands (unique prefixes accepted):", " keygen generate a new master keypair", " archive archive using the public key", " extract extract from an archive using the secret key", " fingerprint print the master keypair fingerprint", "", " -p, --pubkey <file> set the public key file", " -s, --seckey <file> set the secret key file", #if ENCHIVE_OPTION_AGENT " -a, --agent[=seconds] run key agent after reading a passphrase [" STR(ENCHIVE_AGENT_TIMEOUT) "]", " -A, --no-agent don't run the key agent" # if ENCHIVE_AGENT_DEFAULT_ENABLED "", # else " (default)", # endif #endif " --version display version information", " --help display this usage information", "", "Enchive archives files by encrypting them to yourself using your", "public key. It uses ChaCha20, Curve25519, and HMAC-SHA256.", 0};
Remove incorrect path defaults from --help
Remove incorrect path defaults from --help
C
unlicense
skeeto/enchive
f969a9b919fb9765c8f955ab2c68284c41abb097
aes.c
aes.c
#include <stdio.h> #include "aes.h" static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *); static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *); int use_aesni() { return 0; } void aes_encrypt_block(const unsigned char *in, unsigned char *out, const AES_KEY *key) { if (use_aesni()) { aes_encrypt_block_aesni(in, out, key); } else { aes_encrypt_block_openssl(in, out, key); } } static void aes_encrypt_block_openssl(const unsigned char *in, unsigned char *out, const AES_KEY *key) { AES_encrypt(in, out, key); } static void aes_encrypt_block_aesni(const unsigned char *in, unsigned char *out, const AES_KEY *key) { AES_encrypt(in, out, key); }
#include <stdio.h> #include "aes.h" static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *); static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *); int use_aesni() { return 0; } void aes_encrypt_block(const unsigned char *in, unsigned char *out, const AES_KEY *key) { static int aesni; if (aesni == 0) { aesni = use_aesni(); } if (aesni == 1) { aes_encrypt_block_aesni(in, out, key); } else { aes_encrypt_block_openssl(in, out, key); } } static void aes_encrypt_block_openssl(const unsigned char *in, unsigned char *out, const AES_KEY *key) { AES_encrypt(in, out, key); } static void aes_encrypt_block_aesni(const unsigned char *in, unsigned char *out, const AES_KEY *key) { AES_encrypt(in, out, key); }
Use a static variable to track whether to use AES-NI
Use a static variable to track whether to use AES-NI
C
bsd-2-clause
seankelly/aesni,seankelly/aesni
c2b83606e10756537cdbeb528815808a810460d8
ch1/e01-20_detab.c
ch1/e01-20_detab.c
/* * detab: Replace tabs with blanks. */ #include <stdio.h> #define MAXLINE 10000 /* Max input line length. */ #define TABSTOP 8 /* Set tab stop to eight characters. */ int getaline(char *, int); void detab(char *); /* detab: Replace tabs with blanks. */ int main(void) { char line[MAXLINE]; /* Current input line. */ while (getaline(line, MAXLINE) > 0) { detab(line); printf("%s", line); } return 0; } /* getaline: Read a line into `s'; return length. */ int getaline(char *s, int lim) { int c, i; c = 0; for (i = 0; i < lim - 1 && (c = getchar()) != EOF && c != '\n'; ++i) s[i] = c; if (c == '\n') s[i++] = c; s[i] = '\0'; return i; } /* detab: Replace tabs with blanks. */ void detab(char *s) { int i, j; for (i = 0; s[i] != '\0'; ++i) { if (s[i] == '\t') { for (j = 0; j <= (i % TABSTOP + TABSTOP); ++j) s[i + j] = ' '; i += j; } } }
/* * detab: Replace tabs with blanks. */ #include <stdio.h> #define TABSIZE 8 /* detab: Replace tabs with blanks. */ int main(void) { int ch, i; for (i = 0; (ch = getchar()) != EOF; i++) { if (ch == '\n') i = 0; if (ch == '\t') { putchar(' '); while (i % TABSIZE) { putchar(' '); i++; } } else putchar(ch); } return 0; }
Make detab actually work reliably.
Make detab actually work reliably.
C
isc
chettrick/tcpl
e4b57f3333a9da01b823a0024291c64728c688b4
Sources/include/HTMLText.h
Sources/include/HTMLText.h
// // HTMLText.h // HTMLKit // // Created by Iska on 26/02/15. // Copyright (c) 2015 BrainCookie. All rights reserved. // #import "HTMLCharacterData.h" NS_ASSUME_NONNULL_BEGIN /** A HTML Text node */ @interface HTMLText : HTMLCharacterData /** Initializes a new HTML text node. @param data The text string. @return A new isntance of a HTML text node. */ - (instancetype)initWithData:(NSString *)data; /** Appends the string to this text node. @param string The string to append. */ - (void)appendString:(NSString *)string __attribute__((deprecated("Use the mutable data property instead."))); @end NS_ASSUME_NONNULL_END
// // HTMLText.h // HTMLKit // // Created by Iska on 26/02/15. // Copyright (c) 2015 BrainCookie. All rights reserved. // #import "HTMLCharacterData.h" NS_ASSUME_NONNULL_BEGIN /** A HTML Text node */ @interface HTMLText : HTMLCharacterData /** Initializes a new HTML text node. @param data The text string. @return A new isntance of a HTML text node. */ - (instancetype)initWithData:(NSString *)data; /** Appends the string to this text node. @param string The string to append. */ - (void)appendString:(NSString *)string __attribute__((deprecated("Use `appendData:` instead."))); @end NS_ASSUME_NONNULL_END
Update deprecation message in HTML Text node
Update deprecation message in HTML Text node
C
mit
iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit
c4336db289bfad5a3e9274bf181282be86bc6ce7
8/ra.c
8/ra.c
#include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <stdarg.h> #include <ctype.h> #include <string.h> #include <assert.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "parse.h" #include "asm.h" struct Asmbb { int id; char **lbls; size_t nlbls; Insn **insns; size_t ninsns; Bitset *livein; Bitset *liveout; }; void adduses(Insn *i, Bitset *bs) { } void subdefs(Insn *i, Bitset *bs) { }
Add in stubbing in of new register allocator.
Add in stubbing in of new register allocator.
C
mit
8l/myrddin,oridb/mc,oridb/mc,oridb/mc,8l/myrddin,oridb/mc
7283c0eb982a87ac5afe2897a78f470e078c1e24
cmd/smyrna/gui/topviewsettings.h
cmd/smyrna/gui/topviewsettings.h
#ifndef TOPVIEWSETTINGS_H #define TOPVIEWSETTINGS_H #include "smyrnadefs.h" _BB void on_settingsOKBtn_clicked (GtkWidget *widget,gpointer user_data); _BB void on_settingsCancelBtn_clicked (GtkWidget *widget,gpointer user_data); int load_settings_from_graph(Agraph_t *g); int update_graph_from_settings(Agraph_t *g); int show_settings_form(); #endif
/* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifndef TOPVIEWSETTINGS_H #define TOPVIEWSETTINGS_H #include "smyrnadefs.h" _BB void on_settingsOKBtn_clicked(GtkWidget * widget, gpointer user_data); _BB void on_settingsCancelBtn_clicked(GtkWidget * widget, gpointer user_data); extern int load_settings_from_graph(Agraph_t * g); extern int update_graph_from_settings(Agraph_t * g); extern int show_settings_form(); #endif
Clean up smyrna files: remove unnecessary globals modify libraries not to rely on code in cmd/smyrna remove static declarations from .h files remove unnecessary libraries mark unused code and clean up warnings
Clean up smyrna files: remove unnecessary globals modify libraries not to rely on code in cmd/smyrna remove static declarations from .h files remove unnecessary libraries mark unused code and clean up warnings
C
epl-1.0
pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,ellson/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,kbrock/graphviz,tkelman/graphviz,kbrock/graphviz,MjAbuz/graphviz,pixelglow/graphviz,tkelman/graphviz,kbrock/graphviz,jho1965us/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,kbrock/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,MjAbuz/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,ellson/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,ellson/graphviz,tkelman/graphviz,jho1965us/graphviz,tkelman/graphviz,jho1965us/graphviz,jho1965us/graphviz,jho1965us/graphviz,tkelman/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,pixelglow/graphviz,pixelglow/graphviz,MjAbuz/graphviz,jho1965us/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,tkelman/graphviz,kbrock/graphviz,tkelman/graphviz,pixelglow/graphviz,pixelglow/graphviz,MjAbuz/graphviz,MjAbuz/graphviz
f02af86c7adffc88b55c098ef3db9f24df7bf2fc
payload/setupable.h
payload/setupable.h
#ifndef RCR_LEVEL1PAYLOAD_SETUPABLE_H_ #define RCR_LEVEL1PAYLOAD_SETUPABLE_H_ #if defined(ARDUINO) && ARDUINO >= 100 #include "arduino.h" #else #include "WProgram.h" #endif namespace rcr { namespace level1payload { // An interface indicating a class requires construction (or constructor-like) // logic to be delayed until Arduino setup() function. class Setupable { public: // Setup this object. (Especially within the setup() function in the // Arduino program.) virtual void Setup() = 0; // Must provide virtual d'tor and body to prevent memory leak. virtual ~Setupable() {} }; } // namespace level1_payload } // namespace rcr #endif // RCR_LEVEL1PAYLOAD_SETUPABLE_H_
Create an interface indicating a class requires construction (or constructor-like) logic to be delayed until Arduino setup() function
Create an interface indicating a class requires construction (or constructor-like) logic to be delayed until Arduino setup() function
C
mit
nolanholden/geovis,nolanholden/payload-level1-rocket,nolanholden/geovis,nolanholden/geovis
71ee827a7a6a0f71d52df93af91647d74e98316f
unity/unity_config.h
unity/unity_config.h
/**************************************************************************** * Copyright (c) 2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **************************************************************************** */ #ifndef UNITY_CONFIG_H #define UNITY_CONFIG_H /* When using unity with the mbed RTOS printing to the serial port using the stdlib is not allowed as it causes a hardfault. Unity has the following define to control how failure messages are written: #ifndef UNITY_OUTPUT_CHAR #include <stdio.h> #define UNITY_OUTPUT_CHAR(a) (void)putchar(a) #endif To make this safe we can define our own version of UNITY_OUTPUT_CHAR and make sure it is thread safe. */ #ifndef UNITY_OUTPUT_CHAR #define UNITY_OUTPUT_CHAR(a) utest_safe_putc(a) #endif //UNITY_OUTPUT_CHAR #endif // UNITY_CONFIG_H
Add configuration file. Unity provides the ability for the user to add this file in order to substitute built in Unity functions for user specific ones. In this case we are using it to redefine UNITY_OUTPUT_CHAR which is used by all the printing functions. By default it is directed to stdout, however to ensure the use of Unity is safe when used with the mbed RTOS the output char macros is redefined to a utest alternative. This alternative will only write a character to stdout if interrupts are enabled. NOTE to allow this configuration file to be used the following macro must be defined for the build: UNITY_INCLUDE_CONFIG_H
Add configuration file. Unity provides the ability for the user to add this file in order to substitute built in Unity functions for user specific ones. In this case we are using it to redefine UNITY_OUTPUT_CHAR which is used by all the printing functions. By default it is directed to stdout, however to ensure the use of Unity is safe when used with the mbed RTOS the output char macros is redefined to a utest alternative. This alternative will only write a character to stdout if interrupts are enabled. NOTE to allow this configuration file to be used the following macro must be defined for the build: UNITY_INCLUDE_CONFIG_H
C
mit
ARMmbed/unity
5b176269d71cdc9da1890c0633078ea30693fa80
dot.demo/neatopack.c
dot.demo/neatopack.c
/* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #include <gvc.h> #include <pack.h> int main (int argc, char* argv[]) { graph_t *g; graph_t *sg; FILE *fp; graph_t** cc; int i, ncc; GVC_t *gvc; gvc = gvContext(); if (argc > 1) fp = fopen(argv[1], "r"); else fp = stdin; g = agread(fp); cc = ccomps(g, &ncc, (char*)0); for (i = 0; i < ncc; i++) { sg = cc[i]; nodeInduce (sg); gvLayout(gvc, sg, "neato"); } pack_graph (ncc, cc, g, 0); gvRender(gvc, g, "ps", stdout); for (i = 0; i < ncc; i++) { sg = cc[i]; gvFreeLayout(gvc, sg); agdelete(g, sg); } agclose(g); return (gvFreeContext(gvc)); }
Add example using the pack library
Add example using the pack library
C
epl-1.0
MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,pixelglow/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,ellson/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,pixelglow/graphviz,MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,kbrock/graphviz,pixelglow/graphviz,jho1965us/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,BMJHayward/graphviz,jho1965us/graphviz,jho1965us/graphviz,tkelman/graphviz,kbrock/graphviz,tkelman/graphviz,ellson/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,ellson/graphviz,tkelman/graphviz,pixelglow/graphviz,tkelman/graphviz,jho1965us/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,pixelglow/graphviz,kbrock/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,tkelman/graphviz,ellson/graphviz,tkelman/graphviz,jho1965us/graphviz,tkelman/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,tkelman/graphviz,MjAbuz/graphviz,kbrock/graphviz,jho1965us/graphviz,tkelman/graphviz,MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,jho1965us/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,pixelglow/graphviz,kbrock/graphviz
9da17b7f4b31097ece96c929fc0702cd9480333e
net/http/handler.h
net/http/handler.h
// The MIT License (MIT) // // Copyright(c) 2016 huan.wang // // 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, // #pragma once #include <memory> #include "net/http/context.h" namespace net { namespace http { class Handler { public: virtual void ServeHTTP(std::shared_ptr<Context> ctx) = 0; }; } // !namespace http } // !namespace net
Add Handler for user to handle a http request.
Add Handler for user to handle a http request.
C
mit
whrool/Net,whrool/Net
8207e9b84e9581d286baf5869b9dcbf6351ddd50
nwn2mdk-lib/cgmath.h
nwn2mdk-lib/cgmath.h
#pragma once template <typename T> class Vector3 { public: T x, y, z; Vector3(T x, T y, T z) { this->x = x; this->y = y; this->z = z; } }; template <typename T> class Vector4 { public: T x, y, z, w; Vector4() {} Vector4(T x, T y, T z, T w) { this->x = x; this->y = y; this->z = z; this->w = w; } T &operator[](unsigned i) { return (&x)[i]; } };
#pragma once template <typename T> class Vector3 { public: T x, y, z; Vector3(T x, T y, T z) { this->x = x; this->y = y; this->z = z; } T &operator[](unsigned i) { return (&x)[i]; } }; template <typename T> class Vector4 { public: T x, y, z, w; Vector4() {} Vector4(T x, T y, T z, T w) { this->x = x; this->y = y; this->z = z; this->w = w; } T &operator[](unsigned i) { return (&x)[i]; } };
Add subscript operator to Vector3
Add subscript operator to Vector3
C
apache-2.0
Arbos/nwn2mdk,Arbos/nwn2mdk,Arbos/nwn2mdk
9c5503790e1dfc04b1e3b0f5d0bd562e45d6aee1
Caprica/common/IntrusiveLinkedList.h
Caprica/common/IntrusiveLinkedList.h
#pragma once namespace caprica { template<typename T> struct IntrusiveLinkedList final { void push_back(T* val) { mSize++; if (front == nullptr) { front = back = val; } else { back->next = val; back = val; } } size_t size() const { return mSize; } private: size_t mSize{ 0 }; T* front{ nullptr }; T* back{ nullptr }; struct ConstIterator final { ConstIterator& operator ++() { if (cur == nullptr) return *this; cur = cur->next; return *this; } const T*& operator *() { return cur; } const T*& operator *() const { return cur; } const T*& operator ->() { return cur; } const T*& operator ->() const { return cur; } bool operator ==(const ConstIterator& other) const { return cur == other.cur; } bool operator !=(const ConstIterator& other) const { return !(*this == other); } private: friend IntrusiveLinkedList; const T* cur{ nullptr }; ConstIterator() = default; ConstIterator(const T* front) : cur(front) { } }; struct Iterator final { Iterator& operator ++() { if (cur == nullptr) return *this; cur = cur->next; return *this; } T*& operator *() { return cur; } const T*& operator *() const { return cur; } T*& operator ->() { return cur; } const T*& operator ->() const { return cur; } bool operator ==(const Iterator& other) const { return cur == other.cur; } bool operator !=(const Iterator& other) const { return !(*this == other); } private: friend IntrusiveLinkedList; T* cur{ nullptr }; Iterator() = default; Iterator(T* front) : cur(front) { } }; public: ConstIterator begin() const { if (!mSize) return ConstIterator(); return ConstIterator(front); } ConstIterator end() const { return ConstIterator(); } Iterator begin() { if (!mSize) return Iterator(); return Iterator(front); } Iterator end() { return Iterator(); } }; }
Add an intrusive linked list implementation to eliminate the heap allocations needed for the vectors.
Add an intrusive linked list implementation to eliminate the heap allocations needed for the vectors.
C
mit
Orvid/Caprica,Orvid/Caprica
4e74db8e51a59530d7dd2caf48694322ab4cd22b
src/xenia/kernel/objects/xsemaphore.h
src/xenia/kernel/objects/xsemaphore.h
/** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2013 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ #ifndef XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_ #define XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_ #include "xenia/kernel/xobject.h" #include "xenia/xbox.h" namespace xe { namespace kernel { struct X_SEMAPHORE { // TODO: Make this not empty! }; class XSemaphore : public XObject { public: XSemaphore(KernelState* kernel_state); virtual ~XSemaphore(); void Initialize(int32_t initial_count, int32_t maximum_count); void InitializeNative(void* native_ptr, X_DISPATCH_HEADER& header); int32_t ReleaseSemaphore(int32_t release_count); virtual void* GetWaitHandle() { return native_handle_; } private: HANDLE native_handle_; }; } // namespace kernel } // namespace xe #endif // XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_
/** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2013 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ #ifndef XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_ #define XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_ #include "xenia/kernel/xobject.h" #include "xenia/xbox.h" namespace xe { namespace kernel { struct X_SEMAPHORE { X_DISPATCH_HEADER header; // TODO: Make this not empty! }; class XSemaphore : public XObject { public: XSemaphore(KernelState* kernel_state); virtual ~XSemaphore(); void Initialize(int32_t initial_count, int32_t maximum_count); void InitializeNative(void* native_ptr, X_DISPATCH_HEADER& header); int32_t ReleaseSemaphore(int32_t release_count); virtual void* GetWaitHandle() { return native_handle_; } private: HANDLE native_handle_; }; } // namespace kernel } // namespace xe #endif // XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_
Add the dispatch header to X_SEMAPHORE
Add the dispatch header to X_SEMAPHORE
C
bsd-3-clause
greg100795/xenia,KitoHo/xenia,TRex22/xenia,bowlofstew/xenia,DaTrollMon/xenia,no1dead/xenia,DaTrollMon/xenia,Rhodan81/xenia,TRex22/xenia,toxic88/xenia,KitoHo/xenia,herman-rogers/xenia,TingPing/xenia,pwz3n0/xenia,AbaiQi/xenia,MorganBauer/xenia,Drooids/xenia,no1dead/xenia,TRex22/xenia,AbaiQi/xenia,Rhodan81/xenia,no1dead/xenia,MorganBauer/xenia,pwz3n0/xenia,galek/xenia,pwz3n0/xenia,sephiroth99/xenia,ObsidianGuardian/xenia,toxic88/xenia,Rhodan81/xenia,wrren/xenia,MorganBauer/xenia,Rhodan81/xenia,TingPing/xenia,toxic88/xenia,galek/xenia,ObsidianGuardian/xenia,no1dead/xenia,bowlofstew/xenia,bradparks/xenia__xbox_emulator,Drooids/xenia,greg100795/xenia,bradparks/xenia__xbox_emulator,bowlofstew/xenia,AbaiQi/xenia,toxic88/xenia,galek/xenia,TingPing/xenia,Drooids/xenia,sabretooth/xenia,TingPing/xenia,galek/xenia,sephiroth99/xenia,maxton/xenia,greg100795/xenia,bradparks/xenia__xbox_emulator,DaTrollMon/xenia,AbaiQi/xenia,Drooids/xenia,KitoHo/xenia,sabretooth/xenia,wrren/xenia,sephiroth99/xenia,wrren/xenia,bowlofstew/xenia,KitoHo/xenia,bradparks/xenia__xbox_emulator,herman-rogers/xenia,pwz3n0/xenia,maxton/xenia,herman-rogers/xenia,maxton/xenia,MorganBauer/xenia,sabretooth/xenia,ObsidianGuardian/xenia,greg100795/xenia,herman-rogers/xenia,wrren/xenia,DaTrollMon/xenia
ad34178a661c3ff2f0d3caa387b291fb72c49743
src/cpu/register.h
src/cpu/register.h
#pragma once #include "../definitions.h" class ByteRegister { public: ByteRegister() {}; void set(const u8 new_value) { val = new_value; }; u8 value() const { return val; }; void increment() { val += 1; }; void decrement() { val -= 1; }; private: u8 val; }; class WordRegister { public: WordRegister() {}; void set(const u16 new_value) { val = new_value; }; u16 value() const { return val; }; u8 low() const; u8 high() const; void increment() { val += 1; }; void decrement() { val -= 1; }; private: u16 val; }; class RegisterPair { public: RegisterPair(ByteRegister& high, ByteRegister& low); void set_low(const u8 byte); void set_high(const u8 byte); void set_low(const ByteRegister& byte); void set_high(const ByteRegister& byte); void set(const u16 word); u8 low() const; u8 high() const; u16 value() const; void increment(); void decrement(); private: ByteRegister& low_byte; ByteRegister& high_byte; }; class Offset { public: Offset(u8 val) : val(val) {}; Offset(ByteRegister& reg) : val(reg.value()) {}; u8 value() { return val; } private: u8 val; };
#pragma once #include "../definitions.h" class ByteRegister { public: ByteRegister() {} void set(const u8 new_value) { val = new_value; } u8 value() const { return val; } void increment() { val += 1; } void decrement() { val -= 1; } private: u8 val; }; class WordRegister { public: WordRegister() {} void set(const u16 new_value) { val = new_value; } u16 value() const { return val; } u8 low() const; u8 high() const; void increment() { val += 1; } void decrement() { val -= 1; } private: u16 val; }; class RegisterPair { public: RegisterPair(ByteRegister& high, ByteRegister& low); void set_low(const u8 byte); void set_high(const u8 byte); void set_low(const ByteRegister& byte); void set_high(const ByteRegister& byte); void set(const u16 word); u8 low() const; u8 high() const; u16 value() const; void increment(); void decrement(); private: ByteRegister& low_byte; ByteRegister& high_byte; }; class Offset { public: Offset(u8 val) : val(val) {} Offset(ByteRegister& reg) : val(reg.value()) {} u8 value() { return val; } private: u8 val; };
Remove unnecessary semicolon after method definitions
Remove unnecessary semicolon after method definitions
C
bsd-3-clause
jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator
086ad04698d337ba3b4505b320e97eb1c4360e84
tests/sarray_tests.c
tests/sarray_tests.c
#include "minunit.h" #include <lcthw/sarray.h> char *test_create_destroy() { char test[] = "abracadabra"; char test2[] = "acadabra"; SuffixArray *sarry = SuffixArray_create(test, sizeof(test)); mu_assert(sarry, "Failed to create."); int at = SuffixArray_find_suffix(sarry, test2, sizeof(test2)); mu_assert(at != -1, "Failed to find the suffix."); at = SuffixArray_find_suffix(sarry, "yo", sizeof("yo")); mu_assert(at == -1, "Should fail to find yo."); SuffixArray_destroy(sarry); return NULL; } char *all_tests() { mu_suite_start(); mu_run_test(test_create_destroy); return NULL; } RUN_TESTS(all_tests);
#include "minunit.h" #include <lcthw/sarray.h> static SuffixArray *sarry = NULL; static char test[] = "abracadabra"; static char test2[] = "acadabra"; char *test_create() { sarry = SuffixArray_create(test, sizeof(test)); mu_assert(sarry, "Failed to create."); return NULL; } char *test_destroy() { SuffixArray_destroy(sarry); return NULL; } char *test_find_suffix() { int at = SuffixArray_find_suffix(sarry, test2, sizeof(test2)); mu_assert(at != -1, "Failed to find the suffix."); at = SuffixArray_find_suffix(sarry, "yo", sizeof("yo")); mu_assert(at == -1, "Should fail to find yo."); return NULL; } char *all_tests() { mu_suite_start(); mu_run_test(test_create); mu_run_test(test_find_suffix); mu_run_test(test_destroy); return NULL; } RUN_TESTS(all_tests);
Clean up suffix array tests.
Clean up suffix array tests.
C
bsd-3-clause
HappyYang/liblcthw,HappyYang/liblcthw,HappyYang/liblcthw
96de597b3c9491bb257526cb7ed817238c88916a
string_hash.h
string_hash.h
#include <string.h> #include <stdint.h> /** * Efficient string hash function. */ static uint32_t string_hash(const char *str) { uint32_t hash = 0; int32_t c; while ((c = *str++)) { hash = c + (hash << 6) + (hash << 16) - hash; } return hash; } /** * Test two strings for equality. */ static int string_compare(const char *str1, const char *str2) { if (str1 == str2) { return 1; } if (str2 == NULL) { return 0; } return strcmp(str1, str2) == 0; }
#include <string.h> #include <stdint.h> /** * Efficient string hash function. */ __attribute__((unused)) static uint32_t string_hash(const char *str) { uint32_t hash = 0; int32_t c; while ((c = *str++)) { hash = c + (hash << 6) + (hash << 16) - hash; } return hash; } /** * Test two strings for equality. */ __attribute__((unused)) static int string_compare(const char *str1, const char *str2) { if (str1 == str2) { return 1; } if (str2 == NULL) { return 0; } return strcmp(str1, str2) == 0; }
Mark string functions unused, in case the header is included in files that only use one of them.
Mark string functions unused, in case the header is included in files that only use one of them.
C
mit
darlinghq/darling-libobjc2,davidchisnall/libobjc2,ngrewe/libobjc2,crystax/android-vendor-libobjc2,gnustep/libobjc2,davidchisnall/libobjc2,gnustep/libobjc2,crystax/android-vendor-libobjc2,darlinghq/darling-libobjc2,ngrewe/libobjc2
82708729a24f9b77e500982013677d27db1b35d2
cpp11_compliance.h
cpp11_compliance.h
#ifndef CPP11_FEATURES_H #define CPP11_FEATURES_H #if defined(_MSC_VER) && (_MSC_FULL_VER >= 170050727) // for (T t : collection) { } #define CPP11_FOR_EACH // enum class T {}; #define CPP11_ENUM_CLASS #elif defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 6) #define CPP11_FOR_EACH #define CPP11_ENUM_CLASS #endif #endif // Include guard.
Add C++11 compliance check file.
Add C++11 compliance check file.
C
mit
commonquail/efulauncher
d57f4614642ddd22e03f184f5fb430c42f2c4f68
dev/pci/drm/r600_blit_shaders.h
dev/pci/drm/r600_blit_shaders.h
#ifndef R600_BLIT_SHADERS_H #define R600_BLIT_SHADERS_H extern const u32 r6xx_ps[]; extern const u32 r6xx_vs[]; extern const u32 r7xx_default_state[]; extern const u32 r6xx_default_state[]; extern const u32 r6xx_ps_size, r6xx_vs_size; extern const u32 r6xx_default_size, r7xx_default_size; #endif
/* * Copyright 2009 Advanced Micro Devices, 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 (including the next * paragraph) 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 COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS 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. * * Authors: * Alex Deucher <[email protected]> */ #ifndef R600_BLIT_SHADERS_H #define R600_BLIT_SHADERS_H extern const u32 r6xx_ps[]; extern const u32 r6xx_vs[]; extern const u32 r7xx_default_state[]; extern const u32 r6xx_default_state[]; extern const u32 r6xx_ps_size, r6xx_vs_size; extern const u32 r6xx_default_size, r7xx_default_size; #endif
Add missing license (amd, mit/x11)
Add missing license (amd, mit/x11) armani@ noticed that is was missing.
C
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
afa170f2cfa7e84e99559d0f1b3ceafec9c75de0
test/Driver/unknown-arg.c
test/Driver/unknown-arg.c
// RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log // RUN: FileCheck %s -input-file=%t.log // CHECK: unknown argument // CHECK: unknown argument // CHECK: unknown argument
// RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log // RUN: FileCheck %s -input-file=%t.log // CHECK: unknown argument // CHECK: unknown argument // CHECK: unknown argument // RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option -munknown-to-clang-optio // IGNORED: warning: argument unused during compilation: '-funknown-to-clang-option' // IGNORED: warning: argument unused during compilation: '-munknown-to-clang-option' // IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'
Add tests on how clang currently handles some unknown options.
Add tests on how clang currently handles some unknown options. This is not to say this is the desired behavior, but it makes sure we notice if it changes. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@191242 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
621cbbae5dc02cf57527b5a6b67f06b5224536af
templates/template.h
templates/template.h
/* * %FFILE% * Copyright (C) %YEAR% %USER% <%MAIL%> * * Distributed under terms of the %LICENSE% license. */ #ifndef __%GUARD%__ #define __%GUARD%__ %HERE% #endif /* !__%GUARD%__ */
/* * %FFILE% * Copyright (C) %YEAR% %USER% <%MAIL%> * * Distributed under terms of the %LICENSE% license. */ #ifndef %GUARD% #define %GUARD% %HERE% #endif /* !%GUARD% */
Remove underscores from header guard
Remove underscores from header guard
C
bsd-2-clause
lmtim/dotfile,JohnHwee/dotfile,hacpai/dotfile,lmtim/dotfile,henry-zhuang/dotfile
04d6348536a393439c36a7433c4fbf89c52ded32
src/qt/clientmodel.h
src/qt/clientmodel.h
#ifndef CLIENTMODEL_H #define CLIENTMODEL_H #include <QObject> class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: // The only reason that this constructor takes a wallet is because // the global client settings are stored in the main wallet. explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H
#ifndef CLIENTMODEL_H #define CLIENTMODEL_H #include <QObject> class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H
Remove no longer valid comment
Remove no longer valid comment
C
mit
MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin
0a39c49f370780025da6bf828bf66c1c1ab25131
TASKS/TASK_1/sources/vector3d.h
TASKS/TASK_1/sources/vector3d.h
#ifndef VECTOR_3D_H #define VECTOR_3D_H #include <math.h> namespace classes { struct Point3D { double x, y, z; }; typedef const char* err; class Vector3D { struct Cheshire; Cheshire* smile; static const Point3D nullPoint; static unsigned int idCounter; public: Vector3D(Point3D point = nullPoint); Vector3D(double x, double y = 0.0, double z = 0.0); ~Vector3D(); double getModule() const; void print() const; const Point3D& getPoint() const; Vector3D copy() const; void multiplyByScalar(const double); void normalize(); static Vector3D add(Vector3D&, Vector3D&); static Vector3D substract(Vector3D&, Vector3D&); static Vector3D vectorMultiply(Vector3D&, Vector3D&) ; static double scalarMultiply(Vector3D&, Vector3D&); static double sin(Vector3D&, Vector3D&); static double cos(Vector3D&, Vector3D&); static double angle(Vector3D&, Vector3D&); }; } #endif // VECTOR_3D_H
#ifndef VECTOR_3D_H #define VECTOR_3D_H #include <math.h> namespace classes { struct Point3D { double x, y, z; }; typedef const char* err; class Vector3D { struct Cheshire; Cheshire* smile; static const Point3D nullPoint; static unsigned int idCounter; public: Vector3D(Point3D point = nullPoint); Vector3D(double x, double y = 0.0, double z = 0.0); ~Vector3D(); double getModule() const; void print() const; const Point3D& getPoint() const; Vector3D copy() const; void multiplyByScalar(const double); void normalize(); }; namespace VectorsManip { Vector3D add(Vector3D&, Vector3D&); Vector3D substract(Vector3D&, Vector3D&); Vector3D vectorMultiply(Vector3D&, Vector3D&) ; double scalarMultiply(Vector3D&, Vector3D&); double sin(Vector3D&, Vector3D&); double cos(Vector3D&, Vector3D&); double angle(Vector3D&, Vector3D&); } } #endif // VECTOR_3D_H
Move static methods outside of class
Move static methods outside of class
C
mit
reeFridge/learn-oop-through-cpp
71601dd2f566d712033352dc6dc6595374e74434
src/util/util_time.h
src/util/util_time.h
/* * Copyright 2011-2013 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __UTIL_TIME_H__ #define __UTIL_TIME_H__ CCL_NAMESPACE_BEGIN /* Give current time in seconds in double precision, with good accuracy. */ double time_dt(); /* Sleep for the specified number of seconds */ void time_sleep(double t); class scoped_timer { public: explicit scoped_timer(double *value = NULL) : value_(value) { time_start_ = time_dt(); } ~scoped_timer() { if(value_ != NULL) { *value_ = time_dt() - time_start_; } } double get_start() const { return time_start_; } protected: double *value_; double time_start_; }; CCL_NAMESPACE_END #endif
/* * Copyright 2011-2013 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __UTIL_TIME_H__ #define __UTIL_TIME_H__ CCL_NAMESPACE_BEGIN /* Give current time in seconds in double precision, with good accuracy. */ double time_dt(); /* Sleep for the specified number of seconds */ void time_sleep(double t); class scoped_timer { public: explicit scoped_timer(double *value = NULL) : value_(value) { time_start_ = time_dt(); } ~scoped_timer() { if(value_ != NULL) { *value_ = get_time(); } } double get_start() const { return time_start_; } double get_time() const { return time_dt() - time_start_; } protected: double *value_; double time_start_; }; CCL_NAMESPACE_END #endif
Add utility function to query current value of scoped timer
Add utility function to query current value of scoped timer
C
apache-2.0
tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird
ea567d2fad625aaa5163beb543ab5a1084103dab
src/include/tcop/variable.h
src/include/tcop/variable.h
/* * Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var' * statements * * $Id: variable.h,v 1.6 1997/09/08 02:39:21 momjian Exp $ * */ enum DateFormat { Date_Postgres, Date_SQL, Date_ISO }; /*-----------------------------------------------------------------------*/ struct PGVariables { struct { bool euro; enum DateFormat format; } date; }; extern struct PGVariables PGVariables; /*-----------------------------------------------------------------------*/ bool SetPGVariable(const char *, const char *); bool GetPGVariable(const char *); bool ResetPGVariable(const char *);
/* * Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var' * statements * * $Id: variable.h,v 1.7 1997/11/07 06:45:16 thomas Exp $ * */ #ifndef VARIABLE_H #define VARIABLE_H 1 enum DateFormat { Date_Postgres, Date_SQL, Date_ISO }; /*-----------------------------------------------------------------------*/ struct PGVariables { struct { bool euro; enum DateFormat format; } date; }; extern struct PGVariables PGVariables; /*-----------------------------------------------------------------------*/ bool SetPGVariable(const char *, const char *); bool GetPGVariable(const char *); bool ResetPGVariable(const char *); extern bool set_date(void); extern bool show_date(void); extern bool reset_date(void); extern bool parse_date(const char *); extern bool set_timezone(void); extern bool show_timezone(void); extern bool reset_timezone(void); extern bool parse_timezone(const char *); extern bool set_cost_heap(void); extern bool show_cost_heap(void); extern bool reset_cost_heap(void); extern bool parse_cost_heap(const char *); extern bool set_cost_index(void); extern bool show_cost_index(void); extern bool reset_cost_index(void); extern bool parse_cost_index(const char *); extern bool set_r_plans(void); extern bool show_r_plans(void); extern bool reset_r_plans(void); extern bool parse_r_plans(const char *); extern bool set_geqo(void); extern bool show_geqo(void); extern bool reset_geqo(void); extern bool parse_geqo(const char *); #endif /* VARIABLE_H */
Declare routines which support SET keyword = value SQL commands.
Declare routines which support SET keyword = value SQL commands.
C
apache-2.0
kaknikhil/gpdb,tangp3/gpdb,jmcatamney/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,edespino/gpdb,adam8157/gpdb,edespino/gpdb,janebeckman/gpdb,cjcjameson/gpdb,ahachete/gpdb,chrishajas/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,rubikloud/gpdb,chrishajas/gpdb,foyzur/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,Quikling/gpdb,kmjungersen/PostgresXL,royc1/gpdb,foyzur/gpdb,edespino/gpdb,pavanvd/postgres-xl,cjcjameson/gpdb,snaga/postgres-xl,ahachete/gpdb,atris/gpdb,Chibin/gpdb,xinzweb/gpdb,0x0FFF/gpdb,edespino/gpdb,Quikling/gpdb,adam8157/gpdb,tangp3/gpdb,xuegang/gpdb,50wu/gpdb,royc1/gpdb,snaga/postgres-xl,0x0FFF/gpdb,chrishajas/gpdb,adam8157/gpdb,Chibin/gpdb,tangp3/gpdb,pavanvd/postgres-xl,xuegang/gpdb,cjcjameson/gpdb,50wu/gpdb,greenplum-db/gpdb,atris/gpdb,rvs/gpdb,Quikling/gpdb,arcivanov/postgres-xl,Quikling/gpdb,janebeckman/gpdb,foyzur/gpdb,randomtask1155/gpdb,kaknikhil/gpdb,50wu/gpdb,tpostgres-projects/tPostgres,yuanzhao/gpdb,kaknikhil/gpdb,ovr/postgres-xl,lintzc/gpdb,yuanzhao/gpdb,atris/gpdb,Chibin/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,edespino/gpdb,arcivanov/postgres-xl,chrishajas/gpdb,ashwinstar/gpdb,Postgres-XL/Postgres-XL,janebeckman/gpdb,rubikloud/gpdb,atris/gpdb,xuegang/gpdb,rvs/gpdb,rubikloud/gpdb,kaknikhil/gpdb,rvs/gpdb,kmjungersen/PostgresXL,chrishajas/gpdb,zaksoup/gpdb,tangp3/gpdb,jmcatamney/gpdb,Chibin/gpdb,atris/gpdb,0x0FFF/gpdb,janebeckman/gpdb,foyzur/gpdb,zaksoup/gpdb,edespino/gpdb,royc1/gpdb,yuanzhao/gpdb,zeroae/postgres-xl,xinzweb/gpdb,edespino/gpdb,atris/gpdb,foyzur/gpdb,janebeckman/gpdb,Chibin/gpdb,greenplum-db/gpdb,yazun/postgres-xl,xinzweb/gpdb,zeroae/postgres-xl,xinzweb/gpdb,zaksoup/gpdb,tangp3/gpdb,postmind-net/postgres-xl,jmcatamney/gpdb,Quikling/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,chrishajas/gpdb,lintzc/gpdb,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,xuegang/gpdb,lisakowen/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,rvs/gpdb,yuanzhao/gpdb,techdragon/Postgres-XL,zaksoup/gpdb,randomtask1155/gpdb,chrishajas/gpdb,Chibin/gpdb,postmind-net/postgres-xl,rvs/gpdb,zeroae/postgres-xl,lisakowen/gpdb,yazun/postgres-xl,lisakowen/gpdb,CraigHarris/gpdb,Quikling/gpdb,CraigHarris/gpdb,janebeckman/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,techdragon/Postgres-XL,xuegang/gpdb,lpetrov-pivotal/gpdb,postmind-net/postgres-xl,snaga/postgres-xl,jmcatamney/gpdb,rubikloud/gpdb,CraigHarris/gpdb,Quikling/gpdb,ashwinstar/gpdb,xinzweb/gpdb,rubikloud/gpdb,zaksoup/gpdb,oberstet/postgres-xl,zaksoup/gpdb,techdragon/Postgres-XL,postmind-net/postgres-xl,greenplum-db/gpdb,cjcjameson/gpdb,edespino/gpdb,ovr/postgres-xl,rvs/gpdb,yazun/postgres-xl,cjcjameson/gpdb,yazun/postgres-xl,xuegang/gpdb,xinzweb/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,rubikloud/gpdb,Quikling/gpdb,royc1/gpdb,techdragon/Postgres-XL,xuegang/gpdb,lintzc/gpdb,lintzc/gpdb,Chibin/gpdb,randomtask1155/gpdb,randomtask1155/gpdb,kmjungersen/PostgresXL,zaksoup/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,rvs/gpdb,oberstet/postgres-xl,lintzc/gpdb,pavanvd/postgres-xl,kaknikhil/gpdb,jmcatamney/gpdb,edespino/gpdb,royc1/gpdb,rvs/gpdb,lisakowen/gpdb,ahachete/gpdb,royc1/gpdb,ashwinstar/gpdb,foyzur/gpdb,arcivanov/postgres-xl,greenplum-db/gpdb,kmjungersen/PostgresXL,cjcjameson/gpdb,ovr/postgres-xl,lisakowen/gpdb,arcivanov/postgres-xl,pavanvd/postgres-xl,tpostgres-projects/tPostgres,greenplum-db/gpdb,lpetrov-pivotal/gpdb,royc1/gpdb,xuegang/gpdb,lintzc/gpdb,janebeckman/gpdb,snaga/postgres-xl,royc1/gpdb,atris/gpdb,50wu/gpdb,randomtask1155/gpdb,0x0FFF/gpdb,arcivanov/postgres-xl,ovr/postgres-xl,lintzc/gpdb,kaknikhil/gpdb,postmind-net/postgres-xl,janebeckman/gpdb,adam8157/gpdb,ahachete/gpdb,Quikling/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,foyzur/gpdb,lpetrov-pivotal/gpdb,ashwinstar/gpdb,randomtask1155/gpdb,pavanvd/postgres-xl,kaknikhil/gpdb,kmjungersen/PostgresXL,Quikling/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,chrishajas/gpdb,zaksoup/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,janebeckman/gpdb,Chibin/gpdb,zeroae/postgres-xl,yazun/postgres-xl,greenplum-db/gpdb,janebeckman/gpdb,Chibin/gpdb,Postgres-XL/Postgres-XL,snaga/postgres-xl,0x0FFF/gpdb,ahachete/gpdb,tpostgres-projects/tPostgres,tangp3/gpdb,lpetrov-pivotal/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,adam8157/gpdb,tangp3/gpdb,CraigHarris/gpdb,foyzur/gpdb,50wu/gpdb,lintzc/gpdb,randomtask1155/gpdb,lisakowen/gpdb,adam8157/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,CraigHarris/gpdb,techdragon/Postgres-XL,0x0FFF/gpdb,ahachete/gpdb,ovr/postgres-xl,ahachete/gpdb,rubikloud/gpdb,tpostgres-projects/tPostgres,50wu/gpdb,oberstet/postgres-xl,xinzweb/gpdb,kaknikhil/gpdb,oberstet/postgres-xl,rvs/gpdb,xuegang/gpdb,rvs/gpdb,Chibin/gpdb,50wu/gpdb,ahachete/gpdb,oberstet/postgres-xl,rubikloud/gpdb,ashwinstar/gpdb,lisakowen/gpdb,adam8157/gpdb,atris/gpdb,jmcatamney/gpdb,lpetrov-pivotal/gpdb,tangp3/gpdb,adam8157/gpdb,randomtask1155/gpdb,0x0FFF/gpdb,tpostgres-projects/tPostgres,arcivanov/postgres-xl,kaknikhil/gpdb,xinzweb/gpdb
748043fe0214c54be16fadc8fa9b2f50cadfa602
libc/signal/sigsetops.c
libc/signal/sigsetops.c
/* Define the real-function versions of all inline functions defined in signal.h (or bits/sigset.h). */ #include <features.h> #define _EXTERN_INLINE #ifndef __USE_EXTERN_INLINES # define __USE_EXTERN_INLINES 1 #endif #include "signal.h"
/* Define the real-function versions of all inline functions defined in signal.h (or bits/sigset.h). */ #include <features.h> #define _EXTERN_INLINE #ifndef __USE_EXTERN_INLINES # define __USE_EXTERN_INLINES 1 #endif #include <signal.h>
Use <> instead of \"\"
Use <> instead of \"\"
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
79ac2da646ed6285fc64d6c9e7ba13f1f237be0d
test/CodeGen/pr9614.c
test/CodeGen/pr9614.c
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s extern void foo_alias (void) __asm ("foo"); inline void foo (void) { return foo_alias (); } extern void bar_alias (void) __asm ("bar"); inline __attribute__ ((__always_inline__)) void bar (void) { return bar_alias (); } extern char *strrchr_foo (const char *__s, int __c) __asm ("strrchr"); extern inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strrchr_foo (const char *__s, int __c) { return __builtin_strrchr (__s, __c); } void f(void) { foo(); bar(); strrchr_foo("", '.'); } // CHECK: define void @f() // CHECK: call void @foo() // CHECK-NEXT: call void @bar() // CHECK-NEXT: call i8* @strrchr( // CHECK-NEXT: ret void // CHECK: declare void @foo() // CHECK: declare void @bar() // CHECK: declare i8* @strrchr(i8*, i32)
// RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s extern void foo_alias (void) __asm ("foo"); inline void foo (void) { return foo_alias (); } extern void bar_alias (void) __asm ("bar"); inline __attribute__ ((__always_inline__)) void bar (void) { return bar_alias (); } extern char *strrchr_foo (const char *__s, int __c) __asm ("strrchr"); extern inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strrchr_foo (const char *__s, int __c) { return __builtin_strrchr (__s, __c); } void f(void) { foo(); bar(); strrchr_foo("", '.'); } // CHECK: define void @f() // CHECK: call void @foo() // CHECK-NEXT: call void @bar() // CHECK-NEXT: call i8* @strrchr( // CHECK-NEXT: ret void // CHECK: declare void @foo() // CHECK: declare void @bar() // CHECK: declare i8* @strrchr(i8*, i32)
Add a triple to the test.
Add a triple to the test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@146871 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
8993b1ede652b3c81b1cae873a00716b3dd8545d
include/ipv4.h
include/ipv4.h
#ifndef IPV4_H #define IPV4_H #include "syshead.h" #include "netdev.h" #define IPV4 0x04 #define ICMPV4 0x01 struct iphdr { uint8_t version : 4; uint8_t ihl : 4; uint8_t tos; uint16_t len; uint16_t id; uint16_t flags : 3; uint16_t frag_offset : 13; uint8_t ttl; uint8_t proto; uint16_t csum; uint32_t saddr; uint32_t daddr; } __attribute__((packed)); void ipv4_incoming(struct netdev *netdev, struct eth_hdr *hdr); #endif
#ifndef IPV4_H #define IPV4_H #include "syshead.h" #include "netdev.h" #define IPV4 0x04 #define ICMPV4 0x01 struct iphdr { uint8_t ihl : 4; /* TODO: Support Big Endian hosts */ uint8_t version : 4; uint8_t tos; uint16_t len; uint16_t id; uint16_t flags : 3; uint16_t frag_offset : 13; uint8_t ttl; uint8_t proto; uint16_t csum; uint32_t saddr; uint32_t daddr; } __attribute__((packed)); void ipv4_incoming(struct netdev *netdev, struct eth_hdr *hdr); #endif
Swap fields in IPv4 header because of little endianness
Swap fields in IPv4 header because of little endianness This should be handled more gracefully. Now, little endian byte order is assumed.
C
mit
saminiir/level-ip,saminiir/level-ip
1e072dd1f87c672e871185d87b08ade975d2ebea
src/plugins/zlib/istream-bzlib.c
src/plugins/zlib/istream-bzlib.c
/* Copyright (c) 2005-2008 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "istream-internal.h" #include "istream-zlib.h" #ifdef HAVE_BZLIB #include <bzlib.h> #define BZLIB_INCLUDE #define gzFile BZFILE #define gzdopen BZ2_bzdopen #define gzclose BZ2_bzclose #define gzread BZ2_bzread #define gzseek BZ2_bzseek #define i_stream_create_zlib i_stream_create_bzlib #include "istream-zlib.c" #endif
/* Copyright (c) 2005-2008 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "istream-internal.h" #include "istream-zlib.h" #ifdef HAVE_BZLIB #include <stdio.h> #include <bzlib.h> #define BZLIB_INCLUDE #define gzFile BZFILE #define gzdopen BZ2_bzdopen #define gzclose BZ2_bzclose #define gzread BZ2_bzread #define gzseek BZ2_bzseek #define i_stream_create_zlib i_stream_create_bzlib #include "istream-zlib.c" #endif
Include stdio.h in case bzlib.h needs it.
bzlib: Include stdio.h in case bzlib.h needs it. --HG-- branch : HEAD
C
mit
jwm/dovecot-notmuch,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch
9f600fc1d08d458c8ddebe839ee108dd3da324cc
src/socketmanager.h
src/socketmanager.h
#pragma once #include "main.h" #include "logmanager.h" #include "modtypes/socket.h" const std::set<unsigned int> sockAPIVersions { 3000 }; class SocketManager { public: std::shared_ptr<Socket> getSocket(const std::string& socketType); private: void removeSocket(const std::string& socketType, void* sockFile, Socket* deletingSocket); }; class SocketLoadFailed : public std::exception { public: SocketLoadFailed(std::string&& desc) : description(std::forward<std::string>(desc)) {} const char* what() const noexcept { return description.c_str(); } private: std::string description; }; class SocketAPIMismatch : public std::exception { public: const char* what() const noexcept { return "The socket module is not compatible with the current module API."; } }; class SocketOperationFailed : public std::exception { public: SocketConnectFailed(std::string&& desc) : description(std::forward<std::string>(desc)) {} const char* what() const noexcept { return description.c_str(); } private: std::string description; };
#pragma once #include "main.h" #include "logmanager.h" #include "modtypes/socket.h" const std::set<unsigned int> sockAPIVersions { 3000 }; class SocketManager { public: std::shared_ptr<Socket> getSocket(const std::string& socketType); private: void removeSocket(const std::string& socketType, void* sockFile, Socket* deletingSocket); }; class SocketLoadFailed : public std::exception { public: SocketLoadFailed(std::string&& desc) : description(std::forward<std::string>(desc)) {} const char* what() const noexcept { return description.c_str(); } private: std::string description; }; class SocketAPIMismatch : public std::exception { public: const char* what() const noexcept { return "The socket module is not compatible with the current module API."; } }; class SocketOperationFailed : public std::exception { public: SocketOperationFailed(std::string&& desc) : description(std::forward<std::string>(desc)) {} const char* what() const noexcept { return description.c_str(); } private: std::string description; };
Fix me missing the name
Fix me missing the name
C
mit
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
9b5dba2ddba450639ceebdea107dca8186c6d567
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 82 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 83 #endif
Update Skia milestone to 83
Update Skia milestone to 83 Change-Id: I7b62a8c94d1afde1bbec0c476ef8cf8d0e09b677 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276636 Reviewed-by: Eric Boren <[email protected]> Reviewed-by: Heather Miller <[email protected]> Commit-Queue: Eric Boren <[email protected]>
C
bsd-3-clause
google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia
93d7d23a3a2d293da998187cdc9d628086a60d5f
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 61 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 62 #endif
Update Skia milestone to 62
Update Skia milestone to 62 Bug: skia: Change-Id: I94c906422508a75a859c7c780abf520a6083cbf8 Reviewed-on: https://skia-review.googlesource.com/25360 Reviewed-by: Heather Miller <[email protected]> Commit-Queue: Heather Miller <[email protected]>
C
bsd-3-clause
google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia
49fe535bce258eb657ca32e34ef0c50667db044b
include/drivers/brcm/scp.h
include/drivers/brcm/scp.h
/* * Copyright (c) 2017 - 2020, Broadcom * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef SCP_H_ #define SCP_H #include <stdint.h> int download_scp_patch(void *image, unsigned int image_size); #endif /* SCP_H */
/* * Copyright (c) 2017 - 2020, Broadcom * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef SCP_H #define SCP_H #include <stdint.h> int download_scp_patch(void *image, unsigned int image_size); #endif /* SCP_H */
Fix typo in file Header guard
Fix typo in file Header guard Signed-off-by: Sheetal Tigadoli <[email protected]> Change-Id: Iaf6deaeee2069720518221157edbb052bc42850a
C
bsd-3-clause
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
3db51645690be7bf42e954bd154974b5cb5919a9
src/main/c++/RefCache.h
src/main/c++/RefCache.h
#ifndef __REFCACHE_H__ #define __REFCACHE_H__ // Class/Method/Field ID caching // Cache of frequently-used class references struct _classRef { jclass classID; const char *className; }; typedef struct _classRef classRef; // Cache of frequently-used method references struct _methodRef { jmethodID methodID; const int classIndex; const char *methodName; const char *methodSignature; }; typedef struct _methodRef methodRef; // Cache of frequently-used field references struct _fieldRef { jfieldID fieldID; const int classIndex; const char *fieldName; const char *fieldSignature; }; typedef struct _fieldRef fieldRef; class RefCache { public: RefCache(classRef *cr, methodRef *mr, fieldRef *fr) { classRefCache = cr; methodRefCache = mr; fieldRefCache = fr; } jint setUp(JNIEnv *env); void tearDown(JNIEnv *env); private: classRef *classRefCache; methodRef *methodRefCache; fieldRef *fieldRefCache; }; #endif // __REFCACHE_H__
#ifndef __REFCACHE_H__ #define __REFCACHE_H__ // Class/Method/Field ID caching // Cache of frequently-used class references struct _classRef { jclass classID; const char *className; }; typedef struct _classRef classRef; // Cache of frequently-used method references struct _methodRef { jmethodID methodID; int classIndex; // Would be const int if it weren't for VC6 const char *methodName; const char *methodSignature; }; typedef struct _methodRef methodRef; // Cache of frequently-used field references struct _fieldRef { jfieldID fieldID; int classIndex; // Would be const int if it weren't for VC6 const char *fieldName; const char *fieldSignature; }; typedef struct _fieldRef fieldRef; class RefCache { public: RefCache(classRef *cr, methodRef *mr, fieldRef *fr) { classRefCache = cr; methodRefCache = mr; fieldRefCache = fr; } jint setUp(JNIEnv *env); void tearDown(JNIEnv *env); private: classRef *classRefCache; methodRef *methodRefCache; fieldRef *fieldRefCache; }; #endif // __REFCACHE_H__
Remove constness of int fields to enable it to build on VC6.0
Remove constness of int fields to enable it to build on VC6.0
C
apache-2.0
201270842/devzendo-org-xpfsa,steveturner/devzendo-org-xpfsa,steveturner/devzendo-org-xpfsa,201270842/devzendo-org-xpfsa,201270842/devzendo-org-xpfsa,steveturner/devzendo-org-xpfsa,steveturner/devzendo-org-xpfsa,201270842/devzendo-org-xpfsa
8e2cc0f4fff1a414b4ea5a0d27d1a6eb8ba303ef
sys/i386/svr4/svr4_genassym.c
sys/i386/svr4/svr4_genassym.c
/* $FreeBSD$ */ /* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */ #include <sys/assym.h> #include <sys/param.h> struct proc; #include <svr4/svr4.h> #include <svr4/svr4_signal.h> #include <svr4/svr4_ucontext.h> /* XXX: This bit sucks rocks, but gets rid of compiler errors. Maybe I should * fix the include files instead... */ #define SVR4_MACHDEP_JUST_REGS #include <i386/svr4/svr4_machdep.h> ASSYM(SVR4_SIGF_HANDLER, offsetof(struct svr4_sigframe, sf_handler)); ASSYM(SVR4_SIGF_UC, offsetof(struct svr4_sigframe, sf_uc)); ASSYM(SVR4_UC_FS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS])); ASSYM(SVR4_UC_GS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS])); ASSYM(SVR4_UC_EFLAGS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL]));
/* $FreeBSD$ */ /* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */ #include <stddef.h> #include <sys/param.h> #include <sys/assym.h> #include <svr4/svr4_signal.h> #include <svr4/svr4_ucontext.h> /* XXX: This bit sucks rocks, but gets rid of compiler errors. Maybe I should * fix the include files instead... */ #define SVR4_MACHDEP_JUST_REGS #include <i386/svr4/svr4_machdep.h> ASSYM(SVR4_SIGF_HANDLER, offsetof(struct svr4_sigframe, sf_handler)); ASSYM(SVR4_SIGF_UC, offsetof(struct svr4_sigframe, sf_uc)); ASSYM(SVR4_UC_FS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS])); ASSYM(SVR4_UC_GS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS])); ASSYM(SVR4_UC_EFLAGS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL]));
Include <stddef.h> here so that <sys/assym.h> can be unpolluted.
Include <stddef.h> here so that <sys/assym.h> can be unpolluted. Include <sys/param.h> before <sys/assym.h> in case any of the magic in the former is ever needed in the latter. Removed an unused forward declaration and an unused include.
C
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
fc64ea2e8498367046f6f253a71cfe5d855f434d
lib/sfdpgen/sfdpinternal.h
lib/sfdpgen/sfdpinternal.h
/* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifndef SFDPINTERNAL_H #define SFDPINTERNAL_H #include <sfdp.h> #ifdef DEBUG extern double _statistics[10]; #endif typedef double real; #endif
Install original sfdp files, with development logs; recommit new sfdp files
Install original sfdp files, with development logs; recommit new sfdp files
C
epl-1.0
kbrock/graphviz,tkelman/graphviz,BMJHayward/graphviz,jho1965us/graphviz,MjAbuz/graphviz,pixelglow/graphviz,MjAbuz/graphviz,tkelman/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,pixelglow/graphviz,ellson/graphviz,tkelman/graphviz,ellson/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,ellson/graphviz,pixelglow/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,jho1965us/graphviz,BMJHayward/graphviz,tkelman/graphviz,pixelglow/graphviz,MjAbuz/graphviz,ellson/graphviz,tkelman/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,jho1965us/graphviz,BMJHayward/graphviz,tkelman/graphviz,jho1965us/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,tkelman/graphviz,jho1965us/graphviz,tkelman/graphviz,ellson/graphviz,BMJHayward/graphviz,kbrock/graphviz,kbrock/graphviz,kbrock/graphviz,MjAbuz/graphviz,kbrock/graphviz,tkelman/graphviz,ellson/graphviz,pixelglow/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,pixelglow/graphviz,kbrock/graphviz,jho1965us/graphviz
6b5db364f5e67e85e6dfdc9865d538b7685b8577
src/lpc17xx/timer.c
src/lpc17xx/timer.c
#include "LPC17xx.h" #include "lpc_types.h" #include "lpc17xx_timer.h" #include "timer.h" #define SYSTEM_CLOCK_TIMER LPC_TIM3 #define DELAY_TIMER LPC_TIM0 void TIMER3_IRQHandler() { } void delayMs(int delayInMs) { TIM_TIMERCFG_Type delayTimerConfig; TIM_ConfigStructInit(TIM_TIMER_MODE, &delayTimerConfig); TIM_Init(DELAY_TIMER, TIM_TIMER_MODE, &delayTimerConfig); DELAY_TIMER->PR = 0x00; /* set prescaler to zero */ DELAY_TIMER->MR0 = (SystemCoreClock / 4) / (1000 / delayInMs); //enter delay time DELAY_TIMER->IR = 0xff; /* reset all interrupts */ DELAY_TIMER->MCR = 0x04; /* stop timer on match */ TIM_Cmd(DELAY_TIMER, ENABLE); /* wait until delay time has elapsed */ while (DELAY_TIMER->TCR & 0x01); } unsigned long systemTimeMs() { return SYSTEM_CLOCK_TIMER->TC; } void initializeTimers() { TIM_TIMERCFG_Type systemClockTimerConfig; TIM_ConfigStructInit(TIM_TIMER_MODE, &systemClockTimerConfig); TIM_Init(SYSTEM_CLOCK_TIMER, TIM_TIMER_MODE, &systemClockTimerConfig); TIM_Cmd(SYSTEM_CLOCK_TIMER, ENABLE); }
#include "LPC17xx.h" #include "lpc_types.h" #include "lpc17xx_timer.h" #include "timer.h" #define SYSTEM_CLOCK_TIMER LPC_TIM3 #define DELAY_TIMER LPC_TIM0 void delayMs(int delayInMs) { TIM_TIMERCFG_Type delayTimerConfig; TIM_ConfigStructInit(TIM_TIMER_MODE, &delayTimerConfig); TIM_Init(DELAY_TIMER, TIM_TIMER_MODE, &delayTimerConfig); DELAY_TIMER->PR = 0x00; /* set prescaler to zero */ DELAY_TIMER->MR0 = (SystemCoreClock / 4) / (1000 / delayInMs); //enter delay time DELAY_TIMER->IR = 0xff; /* reset all interrupts */ DELAY_TIMER->MCR = 0x04; /* stop timer on match */ TIM_Cmd(DELAY_TIMER, ENABLE); /* wait until delay time has elapsed */ while (DELAY_TIMER->TCR & 0x01); } unsigned long systemTimeMs() { return SYSTEM_CLOCK_TIMER->TC; } void initializeTimers() { TIM_TIMERCFG_Type systemClockTimerConfig; systemClockTimerConfig.PrescaleOption = TIM_PRESCALE_TICKVAL; systemClockTimerConfig.PrescaleValue = SystemCoreClock / (4 * 1000); TIM_Init(SYSTEM_CLOCK_TIMER, TIM_TIMER_MODE, &systemClockTimerConfig); TIM_Cmd(SYSTEM_CLOCK_TIMER, ENABLE); }
Store system clock as milliseconds, not microseconds.
Store system clock as milliseconds, not microseconds.
C
bsd-3-clause
ene-ilies/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware
8bf1dce53748298038119b458ea86a2e6b2ad15b
src/gui/document.h
src/gui/document.h
/* * Copyright (C) 2008-2013 The Communi Project * * This example is free, and not covered by the LGPL license. There is no * restriction applied to their modification, redistribution, using and so on. * You can study them, modify them, use them in your own program - either * completely or partially. */ #ifndef DOCUMENT_H #define DOCUMENT_H #include "textdocument.h" class IrcBuffer; class IrcMessage; class MessageFormatter; class Document : public TextDocument { Q_OBJECT public: Document(IrcBuffer* buffer); ~Document(); IrcBuffer* buffer() const; static Document* instance(IrcBuffer* buffer = 0); public slots: void addBuffer(IrcBuffer* buffer); void removeBuffer(IrcBuffer* buffer); private slots: void receiveMessage(IrcMessage* message); private: struct Private { IrcBuffer* buffer; MessageFormatter* formatter; } d; }; #endif // DOCUMENT_H
/* * Copyright (C) 2008-2013 The Communi Project * * This example is free, and not covered by the LGPL license. There is no * restriction applied to their modification, redistribution, using and so on. * You can study them, modify them, use them in your own program - either * completely or partially. */ #ifndef DOCUMENT_H #define DOCUMENT_H #include "textdocument.h" class IrcBuffer; class IrcMessage; class MessageFormatter; class Document : public TextDocument { Q_OBJECT public: Document(IrcBuffer* buffer); ~Document(); IrcBuffer* buffer() const; static Document* instance(IrcBuffer* buffer = 0); public slots: static void addBuffer(IrcBuffer* buffer); static void removeBuffer(IrcBuffer* buffer); private slots: void receiveMessage(IrcMessage* message); private: struct Private { IrcBuffer* buffer; MessageFormatter* formatter; } d; }; #endif // DOCUMENT_H
Make Document::add() and remove() static
Make Document::add() and remove() static
C
bsd-3-clause
jpnurmi/communi-desktop,sevanteri/communi-desktop,gdamjan/communi-desktop,communi/communi-desktop,communi/communi-desktop
b641a5194c9c11cc495cad2404207f47f7d6aa54
utils/lstopo-xml.c
utils/lstopo-xml.c
/* * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1 * See COPYING in top-level directory. */ #include <private/config.h> #ifdef HAVE_XML #include <hwloc.h> #include "lstopo.h" void output_xml(hwloc_topology_t topology, const char *filename, int verbose_mode) { if (!strcasecmp(filename, "-.xml")) filename = "-"; hwloc_topology_export_xml(topology, filename); } #endif /* HAVE_XML */
/* * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1 * See COPYING in top-level directory. */ #include <private/config.h> #ifdef HAVE_XML #include <hwloc.h> #include <string.h> #include "lstopo.h" void output_xml(hwloc_topology_t topology, const char *filename, int verbose_mode) { if (!strcasecmp(filename, "-.xml")) filename = "-"; hwloc_topology_export_xml(topology, filename); } #endif /* HAVE_XML */
Fix compiler warning complaining about un-proto...
Fix compiler warning complaining about un-proto... Fix compiler warning complaining about un-prototyped strcasecmp(). This commit was SVN r1191.
C
bsd-3-clause
ggouaillardet/hwloc,ggouaillardet/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,shekkbuilder/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc
30c1b638dd5d5ec429067a3b2d386bf3f585bdd1
sdch_handler.h
sdch_handler.h
// Copyright (c) 2015 Yandex LLC. All rights reserved. // Author: Vasily Chekalkin <[email protected]> #ifndef SDCH_HANDLER_H_ #define SDCH_HANDLER_H_ namespace sdch { // SDCH Handler chain. class Handler { public: // Construct Handler with pointer to the next Handler. // We don't own this pointer. It's owned by nginx pool. explicit Handler(Handler* next) : next_(next) {} virtual ~Handler(); // Handle chunk of data. For example encode it with VCDIFF. // Almost every Handler should call next_->on_data() to keep chain. virtual void on_data(const char* buf, size_t len) = 0; protected: Handler* next_; }; } // namespace sdch #endif // SDCH_HANDLER_H_
// Copyright (c) 2015 Yandex LLC. All rights reserved. // Author: Vasily Chekalkin <[email protected]> #ifndef SDCH_HANDLER_H_ #define SDCH_HANDLER_H_ #include <cstring> // For size_t namespace sdch { // SDCH Handler chain. class Handler { public: // Construct Handler with pointer to the next Handler. // We don't own this pointer. It's owned by nginx pool. explicit Handler(Handler* next) : next_(next) {} virtual ~Handler(); // Handle chunk of data. For example encode it with VCDIFF. // Almost every Handler should call next_->on_data() to keep chain. virtual void on_data(const char* buf, size_t len) = 0; protected: Handler* next_; }; } // namespace sdch #endif // SDCH_HANDLER_H_
Fix compilation by using cstring include for size_t definition
Fix compilation by using cstring include for size_t definition
C
mit
yandex/sdch_module,yandex/sdch_module,yandex/sdch_module,yandex/sdch_module
c88a81fc3174e3989a0d75f68f2836ab55f1639e
src/arch/freertos/csp_semaphore.c
src/arch/freertos/csp_semaphore.c
#include <FreeRTOS.h> #include <semphr.h> #include <csp/arch/csp_semaphore.h> #include <csp/csp_debug.h> #include <csp/csp.h> void csp_bin_sem_init(csp_bin_sem_t * sem) { xSemaphoreCreateBinaryStatic(sem); xSemaphoreGive(sem); } int csp_bin_sem_wait(csp_bin_sem_t * sem, uint32_t timeout) { csp_log_lock("Wait: %p", sem); if (timeout != CSP_MAX_TIMEOUT) { timeout = timeout / portTICK_PERIOD_MS; } if (xSemaphoreTake((QueueHandle_t) sem, timeout) == pdPASS) { return CSP_SEMAPHORE_OK; } return CSP_SEMAPHORE_ERROR; } int csp_bin_sem_post(csp_bin_sem_t * sem) { csp_log_lock("Post: %p", sem); if (xSemaphoreGive((QueueHandle_t)sem) == pdPASS) { return CSP_SEMAPHORE_OK; } return CSP_SEMAPHORE_ERROR; }
#include <FreeRTOS.h> #include <semphr.h> #include <csp/arch/csp_semaphore.h> #include <csp/csp_debug.h> #include <csp/csp.h> void csp_bin_sem_init(csp_bin_sem_t * sem) { xSemaphoreCreateBinaryStatic(sem); xSemaphoreGive(sem); } int csp_bin_sem_wait(csp_bin_sem_t * sem, unsigned int timeout) { csp_log_lock("Wait: %p", sem); if (timeout != CSP_MAX_TIMEOUT) { timeout = timeout / portTICK_PERIOD_MS; } if (xSemaphoreTake((QueueHandle_t) sem, timeout) == pdPASS) { return CSP_SEMAPHORE_OK; } return CSP_SEMAPHORE_ERROR; } int csp_bin_sem_post(csp_bin_sem_t * sem) { csp_log_lock("Post: %p", sem); if (xSemaphoreGive((QueueHandle_t)sem) == pdPASS) { return CSP_SEMAPHORE_OK; } return CSP_SEMAPHORE_ERROR; }
Fix function prototype for sem_wait on freertos
Fix function prototype for sem_wait on freertos
C
mit
libcsp/libcsp,libcsp/libcsp
7fa397ca3c0d036c835318c9214a9b7343dfcb8d
src/condor_ckpt/condor_syscalls.h
src/condor_ckpt/condor_syscalls.h
#ifndef _CONDOR_SYSCALLS_H #define _CONDOR_SYSCALLS_H #if defined( AIX32) # include "syscall.aix32.h" #else # include <syscall.h> #endif typedef int BOOL; static const int SYS_LOCAL = 1; static const int SYS_REMOTE = 0; static const int SYS_RECORDED = 2; static const int SYS_MAPPED = 2; static const int SYS_UNRECORDED = 0; static const int SYS_UNMAPPED = 0; #if defined(__cplusplus) extern "C" { #endif int SetSyscalls( int mode ); BOOL LocalSysCalls(); BOOL RemoteSysCalls(); BOOL MappingFileDescriptors(); int REMOTE_syscall( int syscall_num, ... ); #if 0 #if defined(AIX32) && defined(__cplusplus) int syscall( ... ); #elif defined(ULTRIX42) && defined(__cplusplus) int syscall( ... ); #else int syscall( int, ... ); #endif #endif #if defined(__cplusplus) } #endif #endif
#ifndef _CONDOR_SYSCALLS_H #define _CONDOR_SYSCALLS_H #if defined( AIX32) # include "syscall.aix32.h" #else # include <syscall.h> #endif typedef int BOOL; static const int SYS_LOCAL = 1; static const int SYS_REMOTE = 0; static const int SYS_RECORDED = 2; static const int SYS_MAPPED = 2; static const int SYS_UNRECORDED = 0; static const int SYS_UNMAPPED = 0; #if defined(__cplusplus) extern "C" { #endif int SetSyscalls( int mode ); BOOL LocalSysCalls(); BOOL RemoteSysCalls(); BOOL MappingFileDescriptors(); int REMOTE_syscall( int syscall_num, ... ); #if 0 #if defined(AIX32) && defined(__cplusplus) int syscall( ... ); #elif defined(ULTRIX42) && defined(__cplusplus) int syscall( ... ); #else int syscall( int, ... ); #endif #endif #if defined(OSF1) int syscall( int, ... ); #endif #if defined(__cplusplus) } #endif #endif
Put prototype for syscall() in for OSF/1 machines.
Put prototype for syscall() in for OSF/1 machines.
C
apache-2.0
neurodebian/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,neurodebian/htcondor,djw8605/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/condor,htcondor/htcondor,htcondor/htcondor,djw8605/condor,htcondor/htcondor,neurodebian/htcondor,htcondor/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,clalancette/condor-dcloud,zhangzhehust/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,clalancette/condor-dcloud,htcondor/htcondor,htcondor/htcondor,neurodebian/htcondor,djw8605/condor,clalancette/condor-dcloud,clalancette/condor-dcloud,mambelli/osg-bosco-marco,neurodebian/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/condor,neurodebian/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/condor,djw8605/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,djw8605/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,djw8605/htcondor,djw8605/condor,zhangzhehust/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,htcondor/htcondor,djw8605/htcondor,djw8605/condor,bbockelm/condor-network-accounting
67cd74ec17e6061d70d38d48b7c56ce448063f35
test/Driver/output-file-is-dir.c
test/Driver/output-file-is-dir.c
// XFAIL: hexagon // RUN: rm -rf %t.dir // RUN: mkdir -p %t.dir/a.out // RUN: cd %t.dir && not %clang %s // RUN: test -d %t.dir/a.out // REQUIRES: shell int main() { return 0; }
// RUN: rm -rf %t.dir // RUN: mkdir -p %t.dir // RUN: not %clang %s -c -emit-llvm -o %t.dir // RUN: test -d %t.dir int main() { return 0; }
Simplify test so that it is more portable.
Simplify test so that it is more portable. I have checked that the test still fails when the "|| !P.isRegularFile()" from the original patch is removed. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@179464 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
605ec1ec715d3c33b54152e1797b4241b2c3ef89
DigitRecognizerSDK/BNNSHelpers.h
DigitRecognizerSDK/BNNSHelpers.h
// // BNNSHelpers.h // NumberPad // // Created by Bridger Maxwell on 9/1/16. // Copyright © 2016 Bridger Maxwell. All rights reserved. // #include <Accelerate/Accelerate.h> BNNSFilterParameters createEmptyBNNSFilterParameters();
// // BNNSHelpers.h // NumberPad // // Created by Bridger Maxwell on 9/1/16. // Copyright © 2016 Bridger Maxwell. All rights reserved. // @import Accelerate; BNNSFilterParameters createEmptyBNNSFilterParameters();
Fix intermittent build error about non-modular header.
Fix intermittent build error about non-modular header.
C
apache-2.0
bridger/NumberPad,bridger/NumberPad,bridger/NumberPad
be0d3253f7e2ca4fc4912df8021c32b171ce4bc7
src/dirutils.h
src/dirutils.h
/* * Copyright (c) 2012 Kyle Isom <[email protected]> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS 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, DIRECT, 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. * --------------------------------------------------------------------- */ #ifndef __VOLTAIRE_MAKEDIR_H #define __VOLTAIRE_MAKEDIR_H #include <sys/queue.h> #include <stdio.h> enum E_EXISTS_STATUS { EXISTS_ERROR, EXISTS_NOENT, EXISTS_NOPERM, EXISTS_DIR, EXISTS_FILE }; typedef enum E_EXISTS_STATUS EXISTS_STATUS; int makedirs(const char *, size_t); int rmdirs(const char *, size_t); EXISTS_STATUS path_exists(const char *, size_t); #endif
/* * Copyright (c) 2012 Kyle Isom <[email protected]> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS 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, DIRECT, 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. * --------------------------------------------------------------------- */ #ifndef __DIRUTILS_MAKEDIR_H #define __DIRUTILS_MAKEDIR_H #include <sys/queue.h> #include <stdio.h> enum E_EXISTS_STATUS { EXISTS_ERROR, EXISTS_NOENT, EXISTS_NOPERM, EXISTS_DIR, EXISTS_FILE }; typedef enum E_EXISTS_STATUS EXISTS_STATUS; int makedirs(const char *, size_t); int rmdirs(const char *, size_t); EXISTS_STATUS path_exists(const char *, size_t); #endif
Include guard reflects the new project name.
Include guard reflects the new project name. The old include guards were an artifact of the presence of this code in another project before it was split out.
C
isc
kisom/libdirutils,kisom/libdirutils
4492babe6ef32033f3e664b99873f8a5ea1dd052
src/dynamite.c
src/dynamite.c
/* $Id$ */ #include "libdynamite.h" #include <stdio.h> #define FCLOSE(file) if (file) { fclose(file); file = NULL; } typedef struct _Cookie { FILE* input_file; FILE* output_file; } Cookie; static size_t reader(void* buffer, size_t size, void* cookie) { return fread(buffer, 1, size, ((Cookie*)cookie)->input_file); } static size_t writer(void* buffer, size_t size, void* cookie) { return fwrite(buffer, 1, size, ((Cookie*)cookie)->output_file); } int main(int argc, char** argv) { int result = -1; Cookie cookie; cookie.input_file = fopen(argv[1], "r"); cookie.output_file = fopen(argv[2], "w"); result = dynamite_explode(reader, writer, &cookie); FCLOSE(cookie.input_file); FCLOSE(cookie.output_file); return result; }
/* $Id$ */ #include "libdynamite.h" #include <stdio.h> #include <stdlib.h> #define FCLOSE(file) if (file) { fclose(file); file = NULL; } typedef struct _Cookie { FILE* input_file; FILE* output_file; } Cookie; static size_t reader(void* buffer, size_t size, void* cookie) { return fread(buffer, 1, size, ((Cookie*)cookie)->input_file); } static size_t writer(void* buffer, size_t size, void* cookie) { return fwrite(buffer, 1, size, ((Cookie*)cookie)->output_file); } int main(int argc, char** argv) { int result = -1; Cookie cookie; if (argc < 3) { fprintf(stderr, "Missing filenames"); return 1; } cookie.input_file = fopen(argv[1], "r"); cookie.output_file = fopen(argv[2], "w"); if (argc >= 4) { fseek(cookie.input_file, strtol(argv[3], NULL, 0), SEEK_SET); } result = dynamite_explode(reader, writer, &cookie); FCLOSE(cookie.input_file); FCLOSE(cookie.output_file); return result; }
Allow a third parameter for offset
Allow a third parameter for offset
C
mit
twogood/dynamite,twogood/dynamite
a32664dda237c16411c337b63483ad446b24ba4a
src/libxively/xi_allocator_wmsdk.h
src/libxively/xi_allocator_wmsdk.h
// Copyright (c) 2003-2013, LogMeIn, Inc. All rights reserved. // This is part of Xively C library, it is under the BSD 3-Clause license. /** * \file xi_allocator_wmsdk.h * \author Olgierd Humenczuk * \brief Our custom `alloc()` and `free()` [see xi_allocator.h] */ #ifndef __XI_ALLOCATOR_STDLIB_H__ #define __XI_ALLOCATOR_STDLIB_H__ #include <wm_os.h> #ifdef __cplusplus extern "C" { #endif static inline void* xi_alloc( size_t b ) { return ( void* ) os_mem_alloc( b ); } static inline void xi_free( void* p ) { os_mem_free( p ); } #ifdef __cplusplus } #endif #endif
Add back the allocator implementation for WMSDK
[fix] Add back the allocator implementation for WMSDK
C
bsd-3-clause
foss-for-synopsys-dwc-arc-processors/libxively,foss-for-synopsys-dwc-arc-processors/libxively
6aa29c5cc51bc2018b76fd70c20c5f2621bf6853
src/multithread.c
src/multithread.c
#include <stdlib.h> #include <pthread.h> #include "multithread.h" mt_threads *mt_threads_create(unsigned nthreads) { mt_threads *threads = (mt_threads *) malloc(sizeof(mt_threads)); if (!threads) return NULL; threads->contexts = (mt_context *) malloc(sizeof(mt_context) * nthreads); threads->nthreads = nthreads; unsigned i; for (i = 0; i < nthreads; i++) threads->contexts[i].thread_id = i; return threads; } void mt_threads_free(mt_threads *threads) { free(threads->contexts); free(threads); } void mt_threads_start(mt_threads *threads, void*(*runner)(void *)) { unsigned i; for (i = 0; i < threads->nthreads; i++) pthread_create(&threads->contexts[i].pthread, NULL, runner, &threads->contexts[i]); } void mt_threads_join(mt_threads *threads) { unsigned i; for (i = 0; i < threads->nthreads; i++) pthread_join(threads->contexts[i].pthread, NULL); }
#include <stdlib.h> #include <pthread.h> #include "multithread.h" #define THREAD_STACK_SIZE (256*1024) mt_threads *mt_threads_create(unsigned nthreads) { mt_threads *threads = (mt_threads *) malloc(sizeof(mt_threads)); if (!threads) return NULL; threads->contexts = (mt_context *) malloc(sizeof(mt_context) * nthreads); threads->nthreads = nthreads; unsigned i; for (i = 0; i < nthreads; i++) threads->contexts[i].thread_id = i; return threads; } void mt_threads_free(mt_threads *threads) { free(threads->contexts); free(threads); } void mt_threads_start(mt_threads *threads, void*(*runner)(void *)) { pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, THREAD_STACK_SIZE); unsigned i; for (i = 0; i < threads->nthreads; i++) { pthread_create(&threads->contexts[i].pthread, &attr, runner, &threads->contexts[i]); } } void mt_threads_join(mt_threads *threads) { unsigned i; for (i = 0; i < threads->nthreads; i++) pthread_join(threads->contexts[i].pthread, NULL); }
Set thread stack size to 256K
Set thread stack size to 256K
C
bsd-3-clause
calmh/ClusteredPoller,calmh/ClusteredPoller
83159dee4c0c1408ade1fd5b6fe737533045a9a3
Interpolator/IPSourceController.h
Interpolator/IPSourceController.h
#import <Cocoa/Cocoa.h> #import "IPCurveStorage.h" #import "IPCurveView.h" @interface IPSourceController : NSObject <NSTableViewDelegate> { IBOutlet NSTableView * curveSetChooser; IBOutlet IPCurveView * controlPointView; IBOutlet IPCurveStorage * curveStorage; } - (int)numberOfRowsInTableView:(NSTableView *)tableView; - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row; - (void)tableViewSelectionDidChange:(NSNotification *)aNotification; @end
#import <Cocoa/Cocoa.h> #import "IPCurveStorage.h" #import "IPCurveView.h" @interface IPSourceController : NSObject <NSTableViewDelegate> { IBOutlet NSTableView * curveSetChooser; IBOutlet IPCurveView * controlPointView; IBOutlet IPCurveStorage * curveStorage; } - (int)numberOfRowsInTableView:(NSTableView *)tableView; - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row; - (void)tableViewSelectionDidChange:(NSNotification *)aNotification; - (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)row; @end
Add tableview editing function to header
Add tableview editing function to header
C
bsd-2-clause
hortont424/particles,hortont424/particles,hortont424/particles,hortont424/particles
2ba7ec1680f6462122a11f1748f04e1747d8d2e0
tensorflow/core/platform/variant_coding.h
tensorflow/core/platform/variant_coding.h
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_PLATFORM_VARIANT_CODING_H_ #define TENSORFLOW_PLATFORM_VARIANT_CODING_H_ #include "tensorflow/core/framework/variant.h" #ifdef PLATFORM_GOOGLE #include "tensorflow/core/platform/google/variant_cord_coding.h" #endif namespace tensorflow { namespace port { // Encodes an array of Variant objects in to the given string. // `variant_array` is assumed to point to an array of `n` Variant objects. void EncodeVariantList(const Variant* variant_array, int64 n, string* out); // Decodes an array of Variant objects from the given string. // `variant_array` is assumed to point to an array of `n` Variant objects. bool DecodeVariantList(const string& in, Variant* variant_array, int64 n); } // end namespace port } // end namespace tensorflow #endif // TENSORFLOW_PLATFORM_VARIANT_CODING_H_
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_PLATFORM_VARIANT_CODING_H_ #define TENSORFLOW_PLATFORM_VARIANT_CODING_H_ #include "tensorflow/core/framework/variant.h" #include "tensorflow/core/framework/variant_encode_decode.h" #ifdef PLATFORM_GOOGLE #include "tensorflow/core/platform/google/variant_cord_coding.h" #endif namespace tensorflow { namespace port { // Encodes an array of Variant objects in to the given string. // `variant_array` is assumed to point to an array of `n` Variant objects. void EncodeVariantList(const Variant* variant_array, int64 n, string* out); // Decodes an array of Variant objects from the given string. // `variant_array` is assumed to point to an array of `n` Variant objects. bool DecodeVariantList(const string& in, Variant* variant_array, int64 n); } // end namespace port } // end namespace tensorflow #endif // TENSORFLOW_PLATFORM_VARIANT_CODING_H_
Fix link time bug caused by missing header include.
Fix link time bug caused by missing header include. PiperOrigin-RevId: 165952248
C
apache-2.0
aselle/tensorflow,manipopopo/tensorflow,ArtsiomCh/tensorflow,lukeiwanski/tensorflow,dongjoon-hyun/tensorflow,arborh/tensorflow,seanli9jan/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,alsrgv/tensorflow,adamtiger/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,av8ramit/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,jhseu/tensorflow,gunan/tensorflow,Xeralux/tensorflow,aam-at/tensorflow,ppwwyyxx/tensorflow,freedomtan/tensorflow,Bismarrck/tensorflow,caisq/tensorflow,hfp/tensorflow-xsmm,benoitsteiner/tensorflow-opencl,theflofly/tensorflow,renyi533/tensorflow,aam-at/tensorflow,jostep/tensorflow,gunan/tensorflow,snnn/tensorflow,DavidNorman/tensorflow,JingJunYin/tensorflow,aldian/tensorflow,ZhangXinNan/tensorflow,alistairlow/tensorflow,jwlawson/tensorflow,dancingdan/tensorflow,codrut3/tensorflow,jalexvig/tensorflow,renyi533/tensorflow,eadgarchen/tensorflow,arborh/tensorflow,hsaputra/tensorflow,JingJunYin/tensorflow,nburn42/tensorflow,aam-at/tensorflow,gunan/tensorflow,Kongsea/tensorflow,ppwwyyxx/tensorflow,lukeiwanski/tensorflow,davidzchen/tensorflow,mdrumond/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ArtsiomCh/tensorflow,manipopopo/tensorflow,paolodedios/tensorflow,arborh/tensorflow,hehongliang/tensorflow,xzturn/tensorflow,yanchen036/tensorflow,ppwwyyxx/tensorflow,codrut3/tensorflow,lakshayg/tensorflow,kobejean/tensorflow,cxxgtxy/tensorflow,Xeralux/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow,annarev/tensorflow,lukeiwanski/tensorflow,kobejean/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,kobejean/tensorflow,jostep/tensorflow,horance-liu/tensorflow,aldian/tensorflow,aselle/tensorflow,guschmue/tensorflow,Kongsea/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,jbedorf/tensorflow,davidzchen/tensorflow,laszlocsomor/tensorflow,apark263/tensorflow,xzturn/tensorflow,hehongliang/tensorflow,nburn42/tensorflow,Bismarrck/tensorflow,eaplatanios/tensorflow,jwlawson/tensorflow,frreiss/tensorflow-fred,av8ramit/tensorflow,petewarden/tensorflow,asimshankar/tensorflow,laszlocsomor/tensorflow,pavelchristof/gomoku-ai,DavidNorman/tensorflow,karllessard/tensorflow,gojira/tensorflow,tornadozou/tensorflow,pavelchristof/gomoku-ai,Intel-Corporation/tensorflow,jhseu/tensorflow,dancingdan/tensorflow,chemelnucfin/tensorflow,cxxgtxy/tensorflow,jwlawson/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,Mistobaan/tensorflow,theflofly/tensorflow,jostep/tensorflow,xzturn/tensorflow,yongtang/tensorflow,xodus7/tensorflow,DavidNorman/tensorflow,chemelnucfin/tensorflow,yongtang/tensorflow,drpngx/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,jalexvig/tensorflow,karllessard/tensorflow,petewarden/tensorflow,hsaputra/tensorflow,eaplatanios/tensorflow,with-git/tensorflow,theflofly/tensorflow,aselle/tensorflow,jhseu/tensorflow,chemelnucfin/tensorflow,jart/tensorflow,dongjoon-hyun/tensorflow,tillahoffmann/tensorflow,eaplatanios/tensorflow,gojira/tensorflow,ZhangXinNan/tensorflow,snnn/tensorflow,DavidNorman/tensorflow,asimshankar/tensorflow,ychfan/tensorflow,freedomtan/tensorflow,alsrgv/tensorflow,drpngx/tensorflow,dyoung418/tensorflow,sarvex/tensorflow,eadgarchen/tensorflow,ppwwyyxx/tensorflow,Mistobaan/tensorflow,girving/tensorflow,AnishShah/tensorflow,jendap/tensorflow,Bismarrck/tensorflow,apark263/tensorflow,xodus7/tensorflow,jendap/tensorflow,alivecor/tensorflow,eaplatanios/tensorflow,adamtiger/tensorflow,jbedorf/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,kobejean/tensorflow,gunan/tensorflow,benoitsteiner/tensorflow-opencl,laszlocsomor/tensorflow,hehongliang/tensorflow,kevin-coder/tensorflow-fork,hfp/tensorflow-xsmm,dongjoon-hyun/tensorflow,girving/tensorflow,dongjoon-hyun/tensorflow,AnishShah/tensorflow,rabipanda/tensorflow,jalexvig/tensorflow,pavelchristof/gomoku-ai,pavelchristof/gomoku-ai,nburn42/tensorflow,pavelchristof/gomoku-ai,alistairlow/tensorflow,horance-liu/tensorflow,jart/tensorflow,annarev/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,gojira/tensorflow,codrut3/tensorflow,xzturn/tensorflow,pavelchristof/gomoku-ai,renyi533/tensorflow,dancingdan/tensorflow,sarvex/tensorflow,dendisuhubdy/tensorflow,meteorcloudy/tensorflow,theflofly/tensorflow,Intel-Corporation/tensorflow,girving/tensorflow,allenlavoie/tensorflow,tornadozou/tensorflow,aselle/tensorflow,jbedorf/tensorflow,brchiu/tensorflow,dendisuhubdy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ghchinoy/tensorflow,karllessard/tensorflow,aam-at/tensorflow,dendisuhubdy/tensorflow,arborh/tensorflow,theflofly/tensorflow,tornadozou/tensorflow,aselle/tensorflow,davidzchen/tensorflow,bowang/tensorflow,tensorflow/tensorflow,allenlavoie/tensorflow,gojira/tensorflow,a-doumoulakis/tensorflow,dendisuhubdy/tensorflow,chemelnucfin/tensorflow,gojira/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,manipopopo/tensorflow,guschmue/tensorflow,tillahoffmann/tensorflow,nolanliou/tensorflow,jart/tensorflow,manipopopo/tensorflow,annarev/tensorflow,Mistobaan/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,ageron/tensorflow,snnn/tensorflow,ychfan/tensorflow,with-git/tensorflow,alshedivat/tensorflow,ghchinoy/tensorflow,xzturn/tensorflow,av8ramit/tensorflow,girving/tensorflow,dyoung418/tensorflow,a-doumoulakis/tensorflow,drpngx/tensorflow,annarev/tensorflow,tillahoffmann/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xodus7/tensorflow,mdrumond/tensorflow,Bismarrck/tensorflow,meteorcloudy/tensorflow,freedomtan/tensorflow,yanchen036/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,JingJunYin/tensorflow,arborh/tensorflow,tensorflow/tensorflow,nolanliou/tensorflow,ArtsiomCh/tensorflow,aam-at/tensorflow,ppwwyyxx/tensorflow,benoitsteiner/tensorflow-xsmm,Xeralux/tensorflow,jwlawson/tensorflow,JingJunYin/tensorflow,ArtsiomCh/tensorflow,benoitsteiner/tensorflow-xsmm,apark263/tensorflow,xzturn/tensorflow,benoitsteiner/tensorflow-opencl,ychfan/tensorflow,guschmue/tensorflow,nolanliou/tensorflow,jalexvig/tensorflow,manipopopo/tensorflow,petewarden/tensorflow,alshedivat/tensorflow,eaplatanios/tensorflow,davidzchen/tensorflow,dyoung418/tensorflow,karllessard/tensorflow,annarev/tensorflow,xodus7/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,horance-liu/tensorflow,arborh/tensorflow,AnishShah/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,arborh/tensorflow,annarev/tensorflow,karllessard/tensorflow,alivecor/tensorflow,eadgarchen/tensorflow,tensorflow/tensorflow,with-git/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,jostep/tensorflow,ychfan/tensorflow,brchiu/tensorflow,karllessard/tensorflow,ravindrapanda/tensorflow,gautam1858/tensorflow,xodus7/tensorflow,yanchen036/tensorflow,adamtiger/tensorflow,freedomtan/tensorflow,ravindrapanda/tensorflow,eaplatanios/tensorflow,jendap/tensorflow,davidzchen/tensorflow,meteorcloudy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,benoitsteiner/tensorflow-xsmm,tensorflow/tensorflow,meteorcloudy/tensorflow,Mistobaan/tensorflow,ZhangXinNan/tensorflow,xzturn/tensorflow,annarev/tensorflow,dongjoon-hyun/tensorflow,xzturn/tensorflow,renyi533/tensorflow,bowang/tensorflow,benoitsteiner/tensorflow-xsmm,Xeralux/tensorflow,rabipanda/tensorflow,lukeiwanski/tensorflow,kevin-coder/tensorflow-fork,benoitsteiner/tensorflow-opencl,alshedivat/tensorflow,seanli9jan/tensorflow,karllessard/tensorflow,jwlawson/tensorflow,ZhangXinNan/tensorflow,bowang/tensorflow,eaplatanios/tensorflow,benoitsteiner/tensorflow-xsmm,codrut3/tensorflow,nburn42/tensorflow,Kongsea/tensorflow,DavidNorman/tensorflow,zasdfgbnm/tensorflow,theflofly/tensorflow,jalexvig/tensorflow,rabipanda/tensorflow,kobejean/tensorflow,rabipanda/tensorflow,arborh/tensorflow,Bismarrck/tensorflow,jhseu/tensorflow,seanli9jan/tensorflow,av8ramit/tensorflow,dancingdan/tensorflow,adit-chandra/tensorflow,Mazecreator/tensorflow,kobejean/tensorflow,nburn42/tensorflow,dendisuhubdy/tensorflow,ppwwyyxx/tensorflow,meteorcloudy/tensorflow,ArtsiomCh/tensorflow,aam-at/tensorflow,jwlawson/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,ageron/tensorflow,petewarden/tensorflow,girving/tensorflow,rabipanda/tensorflow,a-doumoulakis/tensorflow,yongtang/tensorflow,horance-liu/tensorflow,kevin-coder/tensorflow-fork,adit-chandra/tensorflow,chemelnucfin/tensorflow,alshedivat/tensorflow,drpngx/tensorflow,xzturn/tensorflow,gautam1858/tensorflow,Mazecreator/tensorflow,theflofly/tensorflow,nburn42/tensorflow,Mazecreator/tensorflow,Xeralux/tensorflow,benoitsteiner/tensorflow-opencl,nburn42/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,with-git/tensorflow,brchiu/tensorflow,allenlavoie/tensorflow,Xeralux/tensorflow,alsrgv/tensorflow,bowang/tensorflow,nolanliou/tensorflow,jostep/tensorflow,jendap/tensorflow,nburn42/tensorflow,jwlawson/tensorflow,gunan/tensorflow,apark263/tensorflow,ZhangXinNan/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,hfp/tensorflow-xsmm,dendisuhubdy/tensorflow,alshedivat/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ravindrapanda/tensorflow,adit-chandra/tensorflow,gunan/tensorflow,nolanliou/tensorflow,alistairlow/tensorflow,jbedorf/tensorflow,DavidNorman/tensorflow,lukeiwanski/tensorflow,zasdfgbnm/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,renyi533/tensorflow,dancingdan/tensorflow,av8ramit/tensorflow,zasdfgbnm/tensorflow,hsaputra/tensorflow,DavidNorman/tensorflow,ychfan/tensorflow,chemelnucfin/tensorflow,zasdfgbnm/tensorflow,ppwwyyxx/tensorflow,drpngx/tensorflow,yanchen036/tensorflow,jendap/tensorflow,tillahoffmann/tensorflow,yanchen036/tensorflow,JingJunYin/tensorflow,Mazecreator/tensorflow,rabipanda/tensorflow,frreiss/tensorflow-fred,gojira/tensorflow,yongtang/tensorflow,jalexvig/tensorflow,freedomtan/tensorflow,zasdfgbnm/tensorflow,alshedivat/tensorflow,manipopopo/tensorflow,caisq/tensorflow,cxxgtxy/tensorflow,Kongsea/tensorflow,ZhangXinNan/tensorflow,yongtang/tensorflow,brchiu/tensorflow,meteorcloudy/tensorflow,Bismarrck/tensorflow,av8ramit/tensorflow,ageron/tensorflow,eaplatanios/tensorflow,alsrgv/tensorflow,DavidNorman/tensorflow,jalexvig/tensorflow,zasdfgbnm/tensorflow,nolanliou/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,xodus7/tensorflow,Kongsea/tensorflow,zasdfgbnm/tensorflow,Mistobaan/tensorflow,hehongliang/tensorflow,horance-liu/tensorflow,snnn/tensorflow,mdrumond/tensorflow,dyoung418/tensorflow,karllessard/tensorflow,ArtsiomCh/tensorflow,alistairlow/tensorflow,guschmue/tensorflow,theflofly/tensorflow,alshedivat/tensorflow,caisq/tensorflow,Intel-Corporation/tensorflow,Bismarrck/tensorflow,jendap/tensorflow,mdrumond/tensorflow,jhseu/tensorflow,aselle/tensorflow,davidzchen/tensorflow,hsaputra/tensorflow,meteorcloudy/tensorflow,frreiss/tensorflow-fred,davidzchen/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,alistairlow/tensorflow,meteorcloudy/tensorflow,seanli9jan/tensorflow,AnishShah/tensorflow,dancingdan/tensorflow,gojira/tensorflow,eadgarchen/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,ageron/tensorflow,seanli9jan/tensorflow,asimshankar/tensorflow,ageron/tensorflow,mdrumond/tensorflow,nolanliou/tensorflow,alistairlow/tensorflow,renyi533/tensorflow,zasdfgbnm/tensorflow,horance-liu/tensorflow,ageron/tensorflow,alsrgv/tensorflow,allenlavoie/tensorflow,sarvex/tensorflow,jart/tensorflow,Intel-Corporation/tensorflow,jendap/tensorflow,lakshayg/tensorflow,hsaputra/tensorflow,dancingdan/tensorflow,tornadozou/tensorflow,lukeiwanski/tensorflow,tillahoffmann/tensorflow,alivecor/tensorflow,dancingdan/tensorflow,jart/tensorflow,brchiu/tensorflow,lukeiwanski/tensorflow,arborh/tensorflow,Intel-tensorflow/tensorflow,dongjoon-hyun/tensorflow,benoitsteiner/tensorflow-xsmm,ageron/tensorflow,drpngx/tensorflow,frreiss/tensorflow-fred,benoitsteiner/tensorflow-opencl,annarev/tensorflow,kevin-coder/tensorflow-fork,eadgarchen/tensorflow,horance-liu/tensorflow,adit-chandra/tensorflow,paolodedios/tensorflow,tornadozou/tensorflow,drpngx/tensorflow,tensorflow/tensorflow,petewarden/tensorflow,tillahoffmann/tensorflow,gunan/tensorflow,ghchinoy/tensorflow,Mazecreator/tensorflow,alshedivat/tensorflow,rabipanda/tensorflow,ZhangXinNan/tensorflow,aldian/tensorflow,eadgarchen/tensorflow,asimshankar/tensorflow,alivecor/tensorflow,Intel-Corporation/tensorflow,alivecor/tensorflow,jendap/tensorflow,guschmue/tensorflow,ghchinoy/tensorflow,adit-chandra/tensorflow,gojira/tensorflow,allenlavoie/tensorflow,renyi533/tensorflow,benoitsteiner/tensorflow-xsmm,ghchinoy/tensorflow,Mazecreator/tensorflow,eadgarchen/tensorflow,jalexvig/tensorflow,gunan/tensorflow,snnn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Mistobaan/tensorflow,codrut3/tensorflow,dendisuhubdy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,gautam1858/tensorflow,eaplatanios/tensorflow,seanli9jan/tensorflow,eadgarchen/tensorflow,jwlawson/tensorflow,tensorflow/tensorflow,ravindrapanda/tensorflow,sarvex/tensorflow,tensorflow/tensorflow,bowang/tensorflow,Bismarrck/tensorflow,gojira/tensorflow,yongtang/tensorflow,mdrumond/tensorflow,Xeralux/tensorflow,ravindrapanda/tensorflow,alivecor/tensorflow,aldian/tensorflow,zasdfgbnm/tensorflow,kobejean/tensorflow,gautam1858/tensorflow,alshedivat/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,with-git/tensorflow,laszlocsomor/tensorflow,benoitsteiner/tensorflow-opencl,jendap/tensorflow,jart/tensorflow,tensorflow/tensorflow-pywrap_saved_model,alshedivat/tensorflow,dongjoon-hyun/tensorflow,kevin-coder/tensorflow-fork,apark263/tensorflow,ghchinoy/tensorflow,JingJunYin/tensorflow,drpngx/tensorflow,adit-chandra/tensorflow,nolanliou/tensorflow,adamtiger/tensorflow,freedomtan/tensorflow,alsrgv/tensorflow,laszlocsomor/tensorflow,kobejean/tensorflow,theflofly/tensorflow,Kongsea/tensorflow,gautam1858/tensorflow,eadgarchen/tensorflow,lakshayg/tensorflow,petewarden/tensorflow,benoitsteiner/tensorflow-xsmm,alsrgv/tensorflow,AnishShah/tensorflow,dancingdan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,caisq/tensorflow,gautam1858/tensorflow,ageron/tensorflow,Xeralux/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Mistobaan/tensorflow,brchiu/tensorflow,caisq/tensorflow,jwlawson/tensorflow,jwlawson/tensorflow,benoitsteiner/tensorflow-opencl,nburn42/tensorflow,lukeiwanski/tensorflow,hehongliang/tensorflow,Xeralux/tensorflow,karllessard/tensorflow,aldian/tensorflow,alsrgv/tensorflow,brchiu/tensorflow,chemelnucfin/tensorflow,allenlavoie/tensorflow,aselle/tensorflow,seanli9jan/tensorflow,karllessard/tensorflow,hfp/tensorflow-xsmm,ppwwyyxx/tensorflow,snnn/tensorflow,drpngx/tensorflow,av8ramit/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,asimshankar/tensorflow,girving/tensorflow,benoitsteiner/tensorflow-opencl,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,AnishShah/tensorflow,meteorcloudy/tensorflow,kevin-coder/tensorflow-fork,Kongsea/tensorflow,zasdfgbnm/tensorflow,allenlavoie/tensorflow,lukeiwanski/tensorflow,av8ramit/tensorflow,Mistobaan/tensorflow,ageron/tensorflow,hehongliang/tensorflow,caisq/tensorflow,meteorcloudy/tensorflow,girving/tensorflow,jostep/tensorflow,hfp/tensorflow-xsmm,dongjoon-hyun/tensorflow,kevin-coder/tensorflow-fork,DavidNorman/tensorflow,bowang/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Mazecreator/tensorflow,manipopopo/tensorflow,gautam1858/tensorflow,theflofly/tensorflow,jart/tensorflow,AnishShah/tensorflow,jhseu/tensorflow,jhseu/tensorflow,aselle/tensorflow,brchiu/tensorflow,adit-chandra/tensorflow,xodus7/tensorflow,caisq/tensorflow,dongjoon-hyun/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,alistairlow/tensorflow,apark263/tensorflow,laszlocsomor/tensorflow,adamtiger/tensorflow,a-doumoulakis/tensorflow,jbedorf/tensorflow,sarvex/tensorflow,alistairlow/tensorflow,asimshankar/tensorflow,Intel-tensorflow/tensorflow,kevin-coder/tensorflow-fork,jostep/tensorflow,lukeiwanski/tensorflow,av8ramit/tensorflow,aselle/tensorflow,ZhangXinNan/tensorflow,DavidNorman/tensorflow,adit-chandra/tensorflow,seanli9jan/tensorflow,girving/tensorflow,petewarden/tensorflow,jbedorf/tensorflow,lakshayg/tensorflow,adit-chandra/tensorflow,apark263/tensorflow,cxxgtxy/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,Xeralux/tensorflow,guschmue/tensorflow,gautam1858/tensorflow,ravindrapanda/tensorflow,zasdfgbnm/tensorflow,jbedorf/tensorflow,alivecor/tensorflow,kobejean/tensorflow,rabipanda/tensorflow,cxxgtxy/tensorflow,alsrgv/tensorflow,ravindrapanda/tensorflow,dyoung418/tensorflow,caisq/tensorflow,theflofly/tensorflow,dendisuhubdy/tensorflow,a-doumoulakis/tensorflow,hfp/tensorflow-xsmm,gojira/tensorflow,xodus7/tensorflow,davidzchen/tensorflow,hfp/tensorflow-xsmm,seanli9jan/tensorflow,seanli9jan/tensorflow,lakshayg/tensorflow,jalexvig/tensorflow,ghchinoy/tensorflow,frreiss/tensorflow-fred,DavidNorman/tensorflow,av8ramit/tensorflow,asimshankar/tensorflow,annarev/tensorflow,aselle/tensorflow,apark263/tensorflow,laszlocsomor/tensorflow,AnishShah/tensorflow,Mazecreator/tensorflow,pavelchristof/gomoku-ai,JingJunYin/tensorflow,hsaputra/tensorflow,alivecor/tensorflow,nburn42/tensorflow,chemelnucfin/tensorflow,chemelnucfin/tensorflow,benoitsteiner/tensorflow-xsmm,JingJunYin/tensorflow,ZhangXinNan/tensorflow,nolanliou/tensorflow,xodus7/tensorflow,mdrumond/tensorflow,xzturn/tensorflow,hsaputra/tensorflow,ArtsiomCh/tensorflow,frreiss/tensorflow-fred,alistairlow/tensorflow,seanli9jan/tensorflow,ppwwyyxx/tensorflow,jbedorf/tensorflow,horance-liu/tensorflow,annarev/tensorflow,jbedorf/tensorflow,dongjoon-hyun/tensorflow,manipopopo/tensorflow,jostep/tensorflow,paolodedios/tensorflow,ghchinoy/tensorflow,alistairlow/tensorflow,nburn42/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,benoitsteiner/tensorflow-xsmm,aldian/tensorflow,rabipanda/tensorflow,cxxgtxy/tensorflow,kevin-coder/tensorflow-fork,tensorflow/tensorflow-experimental_link_static_libraries_once,dancingdan/tensorflow,paolodedios/tensorflow,mdrumond/tensorflow,tornadozou/tensorflow,lakshayg/tensorflow,girving/tensorflow,jalexvig/tensorflow,chemelnucfin/tensorflow,hsaputra/tensorflow,gunan/tensorflow,ravindrapanda/tensorflow,jhseu/tensorflow,annarev/tensorflow,arborh/tensorflow,guschmue/tensorflow,JingJunYin/tensorflow,lakshayg/tensorflow,asimshankar/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,snnn/tensorflow,dongjoon-hyun/tensorflow,codrut3/tensorflow,aldian/tensorflow,manipopopo/tensorflow,adit-chandra/tensorflow,dendisuhubdy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,DavidNorman/tensorflow,laszlocsomor/tensorflow,gojira/tensorflow,hsaputra/tensorflow,ychfan/tensorflow,petewarden/tensorflow,girving/tensorflow,jhseu/tensorflow,yanchen036/tensorflow,allenlavoie/tensorflow,davidzchen/tensorflow,asimshankar/tensorflow,apark263/tensorflow,xzturn/tensorflow,brchiu/tensorflow,yongtang/tensorflow,jbedorf/tensorflow,dyoung418/tensorflow,codrut3/tensorflow,aldian/tensorflow,tensorflow/tensorflow,alsrgv/tensorflow,JingJunYin/tensorflow,codrut3/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow-pywrap_saved_model,eaplatanios/tensorflow,ravindrapanda/tensorflow,kevin-coder/tensorflow-fork,hfp/tensorflow-xsmm,tillahoffmann/tensorflow,ghchinoy/tensorflow,AnishShah/tensorflow,petewarden/tensorflow,ychfan/tensorflow,a-doumoulakis/tensorflow,jbedorf/tensorflow,Intel-tensorflow/tensorflow,Mistobaan/tensorflow,chemelnucfin/tensorflow,Xeralux/tensorflow,aselle/tensorflow,Bismarrck/tensorflow,asimshankar/tensorflow,bowang/tensorflow,yanchen036/tensorflow,manipopopo/tensorflow,karllessard/tensorflow,jbedorf/tensorflow,ychfan/tensorflow,Mistobaan/tensorflow,drpngx/tensorflow,allenlavoie/tensorflow,a-doumoulakis/tensorflow,allenlavoie/tensorflow,Mazecreator/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,kobejean/tensorflow,jendap/tensorflow,renyi533/tensorflow,jendap/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,kevin-coder/tensorflow-fork,with-git/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jart/tensorflow,eaplatanios/tensorflow,AnishShah/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,alshedivat/tensorflow,caisq/tensorflow,bowang/tensorflow,allenlavoie/tensorflow,snnn/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jart/tensorflow,sarvex/tensorflow,adamtiger/tensorflow,aam-at/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ghchinoy/tensorflow,Mistobaan/tensorflow,xodus7/tensorflow,caisq/tensorflow,Kongsea/tensorflow,ArtsiomCh/tensorflow,benoitsteiner/tensorflow-xsmm,tornadozou/tensorflow,rabipanda/tensorflow,hsaputra/tensorflow,horance-liu/tensorflow,apark263/tensorflow,snnn/tensorflow,ghchinoy/tensorflow,tornadozou/tensorflow,horance-liu/tensorflow,ZhangXinNan/tensorflow,aam-at/tensorflow,guschmue/tensorflow,rabipanda/tensorflow,xzturn/tensorflow,hehongliang/tensorflow,dyoung418/tensorflow,jalexvig/tensorflow,renyi533/tensorflow,laszlocsomor/tensorflow,with-git/tensorflow,brchiu/tensorflow,Intel-tensorflow/tensorflow,kobejean/tensorflow,ageron/tensorflow,laszlocsomor/tensorflow,dyoung418/tensorflow,AnishShah/tensorflow,petewarden/tensorflow,manipopopo/tensorflow,hfp/tensorflow-xsmm,chemelnucfin/tensorflow,xodus7/tensorflow,av8ramit/tensorflow,a-doumoulakis/tensorflow,tillahoffmann/tensorflow,mdrumond/tensorflow,frreiss/tensorflow-fred,jart/tensorflow,nolanliou/tensorflow,ZhangXinNan/tensorflow,snnn/tensorflow,Intel-tensorflow/tensorflow,codrut3/tensorflow,yongtang/tensorflow,hfp/tensorflow-xsmm,Intel-Corporation/tensorflow,ychfan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,dendisuhubdy/tensorflow,lakshayg/tensorflow,jhseu/tensorflow,guschmue/tensorflow,pavelchristof/gomoku-ai,arborh/tensorflow,theflofly/tensorflow,freedomtan/tensorflow,adamtiger/tensorflow,eadgarchen/tensorflow,jwlawson/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,asimshankar/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,girving/tensorflow,yanchen036/tensorflow,alsrgv/tensorflow,apark263/tensorflow,adit-chandra/tensorflow,with-git/tensorflow,arborh/tensorflow,brchiu/tensorflow,jhseu/tensorflow,renyi533/tensorflow,hfp/tensorflow-xsmm,guschmue/tensorflow,ageron/tensorflow,sarvex/tensorflow,snnn/tensorflow,codrut3/tensorflow,dancingdan/tensorflow,ppwwyyxx/tensorflow
caee45194ec668e0c15c9cc9dd35e498b3ce7f93
src/master/main.c
src/master/main.c
#include <unistd.h> #include <stdio.h> #include <master/usage.h> #include <master/arg.h> #include <share/socket.h> #define IP "88.176.106.132" int main(int argc, char *argv[]) { int socket_fd; config_t *config; if (argc < 5) { usage(); return 0; } /* Error on processing arguments */ if ((config = process_args(argc, argv)) == NULL) return 1; socket_fd = create_client_socket(IP, MULTI_PORT); if (socket_fd < 0) return 1; send_file(socket_fd, config->file->input_file); printf("File sent waiting for response\n"); recv_file(socket_fd, config->file->output_file); destroy_config(&config); close(socket_fd); return 0; }
#include <unistd.h> #include <stdio.h> #include <master/usage.h> #include <master/arg.h> #include <share/socket.h> #define IP "88.176.106.132" int main(int argc, char *argv[]) { int socket_fd; config_t *config; if (argc < 5) { usage(); return 0; } /* Error on processing arguments */ if ((config = process_args(argc, argv)) == NULL) return 1; socket_fd = create_client_socket(IP, MULTI_PORT); if (socket_fd < 0) return 1; printf("Preprocessing file %s\n", config->file->input_file); preprocess(config->file); printf("Preprocessing done\n"); printf("Sending file to server for compilation\n"); send_file(socket_fd, config->file->output_file); printf("File sent waiting for response\n"); recv_file(socket_fd, config->file->output_file); printf("File received\n"); destroy_config(&config); close(socket_fd); return 0; }
Add correct work of client
Add correct work of client
C
mit
Nakrez/multi
91a97b288227ef863d327ab7aa0db1970114864e
src/api/QmlComponentInfo.h
src/api/QmlComponentInfo.h
/**************************************************************************** * * (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ #pragma once #include <QObject> #include <QUrl> /// Represents a Qml component which can be loaded from a resource. class QmlComponentInfo : public QObject { Q_OBJECT public: QmlComponentInfo(QString title, QUrl url, QUrl icon = QUrl(), QObject* parent = NULL); Q_PROPERTY(QString title READ title CONSTANT) ///< Title for page Q_PROPERTY(QUrl url READ url CONSTANT) ///< Qml source code Q_PROPERTY(QUrl icon READ icon CONSTANT) ///< Icon for page virtual QString title () { return _title; } virtual QUrl url () { return _url; } virtual QUrl icon () { return _icon; } protected: QString _title; QUrl _url; QUrl _icon; };
/**************************************************************************** * * (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ #pragma once #include <QObject> #include <QUrl> /// Represents a Qml component which can be loaded from a resource. class QmlComponentInfo : public QObject { Q_OBJECT public: QmlComponentInfo(QString title, QUrl url, QUrl icon = QUrl(), QObject* parent = nullptr); Q_PROPERTY(QString title READ title CONSTANT) ///< Title for page Q_PROPERTY(QUrl url READ url CONSTANT) ///< Qml source code Q_PROPERTY(QUrl icon READ icon CONSTANT) ///< Icon for page virtual QString title () { return _title; } virtual QUrl url () { return _url; } virtual QUrl icon () { return _icon; } protected: QString _title; QUrl _url; QUrl _icon; };
Change NULL or 0 to nullptr
api: Change NULL or 0 to nullptr
C
agpl-3.0
Hunter522/qgroundcontrol,Hunter522/qgroundcontrol,Hunter522/qgroundcontrol,Hunter522/qgroundcontrol,Hunter522/qgroundcontrol,Hunter522/qgroundcontrol
f55af7c049c00c39aecc38572ab18b7f11d88d40
tests/embedded/do_test.c
tests/embedded/do_test.c
#include <hwloc.h> #include <stdio.h> /* The body of the test is in a separate .c file and a separate library, just to ensure that hwloc didn't force compilation with visibility flags enabled. */ int do_test(void) { mytest_hwloc_topology_t topology; unsigned depth; hwloc_cpuset_t cpu_set; /* Just call a bunch of functions to see if we can link and run */ printf("*** Test 1: cpuset alloc\n"); cpu_set = mytest_hwloc_cpuset_alloc(); if (NULL == cpu_set) return 1; printf("*** Test 2: topology init\n"); if (0 != mytest_hwloc_topology_init(&topology)) return 1; printf("*** Test 3: topology load\n"); if (0 != mytest_hwloc_topology_load(topology)) return 1; printf("*** Test 4: topology get depth\n"); depth = mytest_hwloc_topology_get_depth(topology); if (depth < 0) return 1; printf(" Max depth: %u\n", depth); printf("*** Test 5: topology destroy\n"); mytest_hwloc_topology_destroy(topology); printf("*** Test 6: cpuset free\n"); mytest_hwloc_cpuset_free(cpu_set); return 0; }
#include <hwloc.h> #include <stdio.h> /* The body of the test is in a separate .c file and a separate library, just to ensure that hwloc didn't force compilation with visibility flags enabled. */ int do_test(void) { mytest_hwloc_topology_t topology; unsigned depth; hwloc_bitmap_t cpu_set; /* Just call a bunch of functions to see if we can link and run */ printf("*** Test 1: bitmap alloc\n"); cpu_set = mytest_hwloc_bitmap_alloc(); if (NULL == cpu_set) return 1; printf("*** Test 2: topology init\n"); if (0 != mytest_hwloc_topology_init(&topology)) return 1; printf("*** Test 3: topology load\n"); if (0 != mytest_hwloc_topology_load(topology)) return 1; printf("*** Test 4: topology get depth\n"); depth = mytest_hwloc_topology_get_depth(topology); if (depth < 0) return 1; printf(" Max depth: %u\n", depth); printf("*** Test 5: topology destroy\n"); mytest_hwloc_topology_destroy(topology); printf("*** Test 6: bitmap free\n"); mytest_hwloc_bitmap_free(cpu_set); return 0; }
Convert the embedded test to the bitmap API
Convert the embedded test to the bitmap API git-svn-id: bb34cd5123d2f821b9f934b050c449c8bfd5d5c1@2512 4b44e086-7f34-40ce-a3bd-00e031736276
C
bsd-3-clause
BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc
dda47eadfe9158630eb41297bb1c0c1d7c6136d4
You-DataStore/internal/operation.h
You-DataStore/internal/operation.h
#pragma once #ifndef YOU_DATASTORE_INTERNAL_OPERATION_H_ #define YOU_DATASTORE_INTERNAL_OPERATION_H_ #include <unordered_map> #include "../task_typedefs.h" namespace You { namespace DataStore { namespace Internal { /// A pure virtual class of operations to be put into transaction stack class IOperation { public: virtual ~IOperation(); /// Executes the operation virtual bool run() = 0; protected: TaskId taskId; SerializedTask task; }; } // namespace Internal } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_INTERNAL_OPERATION_H_
#pragma once #ifndef YOU_DATASTORE_INTERNAL_OPERATION_H_ #define YOU_DATASTORE_INTERNAL_OPERATION_H_ #include <unordered_map> #include "../task_typedefs.h" #include "internal_datastore.h" namespace You { namespace DataStore { namespace Internal { /// A pure virtual class of operations to be put into transaction stack class IOperation { public: virtual ~IOperation(); /// Executes the operation virtual bool run() = 0; protected: TaskId taskId; SerializedTask task; }; } // namespace Internal } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_INTERNAL_OPERATION_H_
Include InternalDataStore into Operation interface
Include InternalDataStore into Operation interface
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
7c00fb727fd67a65044feb9d10a6b839602751cf
src/kms-media-handler-manager.c
src/kms-media-handler-manager.c
#include "kms-media-handler-manager.h" static void kms_media_handler_manager_base_init (gpointer g_class) { static gboolean is_initialized = FALSE; if (!is_initialized) { /* add properties and signals to the interface here */ is_initialized = TRUE; } } GType kms_media_handler_manager_get_type(void) { static GType iface_type = 0; if (iface_type == 0) { static const GTypeInfo info = { sizeof (KmsMediaHandlerManagerInterface), kms_media_handler_manager_base_init, /* base_init */ NULL, /* base_finalize */ }; iface_type = g_type_register_static(G_TYPE_INTERFACE, "KmsMediaHandlerManager", &info, 0); } return iface_type; } void kms_media_handler_manager_get_factory(KmsMediaHandlerManager *self) { g_return_if_fail(KMS_IS_MEDIA_HANDLER_MANAGER (self)); KMS_MEDIA_HANDLER_MANAGER_GET_INTERFACE(self)->get_factory(self); }
#include "kms-media-handler-manager.h" static void kms_media_handler_manager_base_init (gpointer g_class) { static gboolean is_initialized = FALSE; if (!is_initialized) { /* add properties and signals to the interface here */ is_initialized = TRUE; } } GType kms_media_handler_manager_get_type(void) { static GType iface_type = 0; if (iface_type == 0) { static const GTypeInfo info = { sizeof (KmsMediaHandlerManagerInterface), kms_media_handler_manager_base_init, /* base_init */ NULL, /* base_finalize */ }; iface_type = g_type_register_static(G_TYPE_INTERFACE, "KmsMediaHandlerManager", &info, 0); } return iface_type; } KmsMediaHandlerFactory* kms_media_handler_manager_get_factory(KmsMediaHandlerManager *self) { KmsMediaHandlerManagerInterface *iface; g_return_if_fail(KMS_IS_MEDIA_HANDLER_MANAGER (self)); iface = KMS_MEDIA_HANDLER_MANAGER_GET_INTERFACE(self); if (iface->get_factory != NULL) KMS_MEDIA_HANDLER_MANAGER_GET_INTERFACE(self)->get_factory(self); else { gchar *msg = g_strdup_printf( "%s does not provide and implementation of " "get_factory method", G_INTERFACE_NAME(iface)); g_warn_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); g_free(msg); } }
Check if the interface method is not null before using it
Check if the interface method is not null before using it
C
apache-2.0
Kurento/kurento-media-server,shelsonjava/kurento-media-server,lulufei/kurento-media-server,lulufei/kurento-media-server,TribeMedia/kurento-media-server,Kurento/kurento-media-server,mparis/kurento-media-server,todotobe1/kurento-media-server,mparis/kurento-media-server,TribeMedia/kurento-media-server,todotobe1/kurento-media-server,shelsonjava/kurento-media-server
d8f8412f90baf469c70b1da6903b853d83a14293
PhotoWheel/FlickrViewController.h
PhotoWheel/FlickrViewController.h
// // FlickrViewController.h // PhotoWheel // // Created by Kirby Turner on 12/16/12. // Copyright (c) 2012 White Peak Software Inc. All rights reserved. // #import <UIKit/UIKit.h> @class PhotoAlbum; @interface FlickrViewController : UIViewController <UICollectionViewDataSource, UICollectionViewDelegate, UISearchBarDelegate> @property (nonatomic, strong) IBOutlet UICollectionView *collectionView; @property (nonatomic, strong) IBOutlet UIView *overlayView; @property (nonatomic, strong) IBOutlet UISearchBar *searchBar; @property (nonatomic, strong) IBOutlet UIActivityIndicatorView *activityIndicator; @property (nonatomic, strong) PhotoAlbum *photoAlbum; - (IBAction)save:(id)sender; - (IBAction)cancel:(id)sender; @end
// // FlickrViewController.h // PhotoWheel // // Created by Kirby Turner on 12/16/12. // Copyright (c) 2012 White Peak Software Inc. All rights reserved. // #import <UIKit/UIKit.h> @class PhotoAlbum; @interface FlickrViewController : UIViewController <UICollectionViewDataSource, UICollectionViewDelegate, UISearchBarDelegate> @property (nonatomic, weak) IBOutlet UICollectionView *collectionView; @property (nonatomic, weak) IBOutlet UIView *overlayView; @property (nonatomic, weak) IBOutlet UISearchBar *searchBar; @property (nonatomic, weak) IBOutlet UIActivityIndicatorView *activityIndicator; @property (nonatomic, strong) PhotoAlbum *photoAlbum; - (IBAction)save:(id)sender; - (IBAction)cancel:(id)sender; @end
Change outlets from strong to weak references.
Change outlets from strong to weak references.
C
mit
kirbyt/PhotoWheel,kirbyt/PhotoWheel
96235e550e366f1a494061b147899f0a26ead3e2
hacker2/crack.c
hacker2/crack.c
#define _XOPEN_SOURCE #include <cs50.h> #include <stdio.h> #include <string.h> #include <unistd.h> bool dictionaryAttack(string ciphertext); bool bruteForceAttack(string ciphertext); bool next(char* word, int n); int main(int argc, string argv[]) { if (argc != 2) { printf("Usage: ./crack ciphertext\n"); return 1; } if (dictionaryAttack(argv[1])) printf("Password cracked successfully via dictionary attack.\n"); else if (bruteForceAttack(argv[1])) printf("Password cracked successfully via brute force attack.\n"); else printf("Unable to crack password.\n"); } bool dictionaryAttack(string ciphertext) { printf("Dictionary attack initiated.\n"); char word[128]; char salt[2]; strncpy(salt, ciphertext, 2); FILE *wordlist = fopen("/usr/share/dict/words", "r"); while (fgets(word, 128, wordlist)) { // fgets reads new line characters, and we don't want those word[strlen(word) - 1] = '\0'; if (!strcmp(crypt(word, salt), ciphertext)) { printf("Password found: %s\n", word); return true; } } fclose(wordlist); printf("Dictionary attack failed.\n"); return false; } bool bruteForceAttack(string ciphertext) { printf("Brute force attack initiated.\n"); char salt[2]; strncpy(salt, ciphertext, 2); for (int length = 1; length <= 8; length++) { printf("Trying passwords of length %d...\n", length); char* word = calloc(length + 1, sizeof(char)); do { if (!strcmp(crypt(word, salt), ciphertext)) { printf("Password found: %s\n", word); return true; } } while (next(word, length)); } printf("Brute force attack failed.\n"); return false; } bool next(char* word, int length) { for (int i = length - 1; i >= 0; i--) if (word[i] < 127) { word[i]++; for (int j = i+1; j < length; j++) word[j] = 0; return true; } return false; }
Add source file for Problem Set 2 (Hacker Edition)
Add source file for Problem Set 2 (Hacker Edition)
C
mit
juampi/cs50,juampi/cs50
76698748d645a1dd73589313405e2aefcdba5d90
include/nmlib.h
include/nmlib.h
// All-in-one header of nmlib #ifndef NMLIB_H #define NMLIB_H #include "chrono.h" #include "diff.h" #include "fft.h" #include "integral.h" #include "io.h" #include "kalman.h" #include "lp.h" #include "matrix.h" #include "matrix_decomp.h" #include "optimization.h" #include "polynomial.h" #include "random.h" #include "robot.h" #include "route.h" #include "solver.h" #include "sparse.h" #include "spline.h" #include "stat.h" #ifdef NMLIB_DISABLE_NAMESPACE using namespace nmlib; #endif #endif //NMLIB_H
// All-in-one header of nmlib #ifndef NMLIB_H #define NMLIB_H #include "chrono.h" #include "diff.h" #include "fft.h" #include "integral.h" #include "io.h" #include "kalman.h" #include "lp.h" #include "matrix.h" #include "matrix_decomp.h" #include "ode.h" #include "optimization.h" #include "polynomial.h" #include "random.h" #include "robot.h" #include "route.h" #include "solver.h" #include "sparse.h" #include "spline.h" #include "stat.h" #ifdef NMLIB_DISABLE_NAMESPACE using namespace nmlib; #endif #endif //NMLIB_H
Update all-in-one header (add ode.h)
Update all-in-one header (add ode.h)
C
mit
nmakimoto/nmlib,nmakimoto/nmlib
eb6f58307e488a8468c725af20cd482d62b37136
Pod/Classes/TTRangeSliderDelegate.h
Pod/Classes/TTRangeSliderDelegate.h
// // YLRangeSliderViewDelegate.h // FantasyRealFootball // // Created by Tom Thorpe on 16/04/2014. // Copyright (c) 2014 Yahoo inc. All rights reserved. // #import <Foundation/Foundation.h> @class TTRangeSlider; @protocol TTRangeSliderDelegate <NSObject> -(void)rangeSlider:(TTRangeSlider *)sender didChangeSelectedMinimumValue:(float)selectedMinimum andMaximumValue:(float)selectedMaximum; @optional - (void)didEndTouchesInRangeSlider:(TTRangeSlider *)sender; @end
// // YLRangeSliderViewDelegate.h // FantasyRealFootball // // Created by Tom Thorpe on 16/04/2014. // Copyright (c) 2014 Yahoo inc. All rights reserved. // #import <Foundation/Foundation.h> @class TTRangeSlider; @protocol TTRangeSliderDelegate <NSObject> /** * Called when the RangeSlider values are changed */ -(void)rangeSlider:(TTRangeSlider *)sender didChangeSelectedMinimumValue:(float)selectedMinimum andMaximumValue:(float)selectedMaximum; @optional /** * Called when the user has finished interacting with the RangeSlider */ - (void)didEndTouchesInRangeSlider:(TTRangeSlider *)sender; @end
Comment on didEndTouchesInRangeSlider and other delegate method
Comment on didEndTouchesInRangeSlider and other delegate method Adding a comment on didEndTouchesInRangeSlider and the other didChange... method to explain it's purpose (fairly explanatory names anyway, but just for completeness)
C
mit
TomThorpe/TTRangeSlider
cb562a87d85965b9e3ed9db86c7af036db7ee485
main.c
main.c
/* The contents of this file is in the public domain. */ #include <ipify.h> int main(void) { char addr[256]; #if 0 int sd; sd = ipify_connect(); if (sd < 0) return 1; if (!ipify_query(sd, addr, sizeof(addr))) printf("%s\n", addr); return ipify_disconnect(sd); #else if (ipify(addr, sizeof(addr))) return 1; printf("%s\n", addr); return 0; #endif }
/* The contents of this file is in the public domain. */ #include <ipify.h> int main(void) { char addr[256]; int sd; sd = ipify_connect(); if (sd < 0) return 1; if (!ipify_query(sd, addr, sizeof(addr))) printf("%s\n", addr); return ipify_disconnect(sd); }
Drop ifdefs in favor of more comprehensive code
Drop ifdefs in favor of more comprehensive code Signed-off-by: Joachim Wiberg <[email protected]>
C
isc
troglobit/lipify
a56195292bc9d68da9b496b253411df2cac40500
021.calling_c/c_code.c
021.calling_c/c_code.c
void PokeBitplanePointers(unsigned short* copper, unsigned char* bitplanes, unsigned offset, unsigned numBitplanes, unsigned screenWidthBytes) { int i; copper += offset; for (i = 0; i < numBitplanes; i++) { *(copper+1) = (unsigned)bitplanes; *(copper+3) = ((unsigned)bitplanes >> 16); bitplanes += screenWidthBytes; copper += 4; } } static unsigned short _copperData; static unsigned char _bitplaneData; void TestCall() { PokeBitplanePointers(&_copperData, &_bitplaneData, 3, 4, 5); }
typedef union { unsigned char* ptr; unsigned short word[2]; } word_extract_t; void PokeBitplanePointers(unsigned short* copper, unsigned char* bitplanes, unsigned offset, unsigned numBitplanes, unsigned screenWidthBytes) { int i; copper += offset; for (i = 0; i < numBitplanes; i++) { word_extract_t extract; extract.ptr = bitplanes; *(copper+1) = extract.word[1]; *(copper+3) = extract.word[0]; bitplanes += screenWidthBytes; copper += 4; } } static unsigned short _copperData; static unsigned char _bitplaneData; void TestCall() { PokeBitplanePointers(&_copperData, &_bitplaneData, 3, 4, 5); }
Make C example more C, less asm
Make C example more C, less asm
C
bsd-2-clause
alpine9000/amiga_examples,alpine9000/amiga_examples,alpine9000/amiga_examples
3c7420fe27927849cd53452fefde7bfff0cec30b
debug.h
debug.h
/** * `debug.h' - debug.c * * copyright (c) 2014 joseph werle <[email protected]> */ #ifndef DEBUG_H #define DEBUG_H 1 #include <stdlib.h> #include <stdio.h> #include <stdarg.h> #define DEBUG_MAX_BUFFER 1024 /** * Debug function type */ typedef void (* debug_t) (const char *, ...); /** * Initialize a debug function */ #define debug_init(name) \ void _debug_ ## name (const char *fmt, ...) { \ if (!debug_enabled(#name)) { return; } \ char buf[DEBUG_MAX_BUFFER]; \ va_list args; \ va_start(args, fmt); \ vsprintf(buf, fmt, args); \ printf(#name " - %s\n", buf); \ va_end(args); \ } \ /** * Return a named debug function */ #define debug_get(name) (debug_t) ( _debug_ ## name) /** * Returns `1' if a function is enabled * else `0' */ int debug_enabled (const char *); #endif
/** * `debug.h' - debug.c * * copyright (c) 2014 joseph werle <[email protected]> */ #ifndef DEBUG_H #define DEBUG_H 1 #include <stdlib.h> #include <stdio.h> #include <stdarg.h> /** * Debug function type */ typedef void (* debug_t) (const char *, ...); /** * Initialize a debug function */ #define debug_init(name) \ void _debug_ ## name (const char *fmt, ...) { \ if (!debug_enabled(#name)) { return; } \ char *buf = NULL; \ va_list args; \ va_start(args, fmt); \ vasprintf(&buf, fmt, args); \ printf(#name " - %s\n", buf); \ va_end(args); \ free(buf); \ } \ /** * Return a named debug function */ #define debug_get(name) (debug_t) ( _debug_ ## name) /** * Returns `1' if a function is enabled * else `0' */ int debug_enabled (const char *); #endif
Fix possible memory overflow and remove DEBUG_MAX_BUFFER
Fix possible memory overflow and remove DEBUG_MAX_BUFFER
C
mit
clibs/debug
cabe5c6e4b05460cc8320f96197a1246b555ea76
hello.c
hello.c
/* * hello.c - Say hello to the world. * Susumu Ishihara 2015/4/12 */ #include <stdio.h> int main() { printf("Hello world.\n."); printf("Hello susumu.\n"); printf("Added new branch.\n"); return 0; }
/* * hello.c - Say hello to the world. * Susumu Ishihara 2015/4/12 */ #include <stdio.h> int main() { printf("Hello world.\n."); printf("Hello susumu.\n"); printf("Added new branch.\n"); printf("Hello universe.\n"); return 0; }
Make it say "Hello universe."
Make it say "Hello universe."
C
mit
ishihara-su/firsttest
1e4c33a677ba085bbbbfff211719ae4bb571c5b1
test/Sema/format-strings-scanf.c
test/Sema/format-strings-scanf.c
// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral %s typedef __typeof(sizeof(int)) size_t; typedef struct _FILE FILE; int fscanf(FILE * restrict, const char * restrict, ...) ; int scanf(const char * restrict, ...) ; int sscanf(const char * restrict, const char * restrict, ...) ; void test(const char *s, int *i) { scanf(s, i); // expected-warning{{ormat string is not a string literal}} scanf("%0d", i); // expected-warning{{conversion specifies 0 input characters for field width}} scanf("%00d", i); // expected-warning{{conversion specifies 0 input characters for field width}} }
Add initial test cases for scanf format string checking.
Add initial test cases for scanf format string checking. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@108503 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
c14b63a0b916969d4bd1cdaa0e58a7761edeab74
lib/libc/sparc64/gen/fpsetmask.c
lib/libc/sparc64/gen/fpsetmask.c
/* * Written by J.T. Conklin, Apr 10, 1995 * Public domain. */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #include <ieeefp.h> fp_except_t fpsetmask(mask) fp_except_t mask; { fp_except_t old; fp_except_t new; __asm__("st %%fsr,%0" : "=m" (*&old)); new = old; new &= ~(0x1f << 23); new |= ((mask & 0x1f) << 23); __asm__("ld %0,%%fsr" : : "m" (*&new)); return (old >> 23) & 0x1f; }
/* * Written by J.T. Conklin, Apr 10, 1995 * Public domain. */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #include <machine/fsr.h> #include <ieeefp.h> fp_except_t fpsetmask(mask) fp_except_t mask; { fp_except_t old; fp_except_t new; __asm__("st %%fsr,%0" : "=m" (old)); new = old; new &= ~FSR_TEM_MASK; new |= FSR_TEM(mask & FSR_EXC_MASK); __asm__("ld %0,%%fsr" : : "m" (new)); return (FSR_GET_TEM(old)); }
Use the macros from machine/fsr.h; some minor cleanups.
Use the macros from machine/fsr.h; some minor cleanups.
C
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase