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
4f97e019ba54c2258f171a81da6fb587641ed415
test/Lexer/rdr-6096838.c
test/Lexer/rdr-6096838.c
/* RUN: clang -fsyntax-only -verify %s && * RUN: clang -std=gnu89 -fsyntax-only -verify %s && * RUN: clang -DPEDANTIC -pedantic -std=gnu89 -fsyntax-only -verify %s */ #ifdef PEDANTIC long double d = 0x0.0000003ffffffff00000p-16357L; /* expected-warning {{ hexadecimal floating constants are a C99 feature }} */ #else long double d = 0x0.0000003ffffffff00000p-16357L; #endif
Add test case for hex floating point constants in < C99 mode - For: rdar://6096838
Add test case for hex floating point constants in < C99 mode - For: rdar://6096838 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@54036 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/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,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
12e777affa9dc0a5a7b9616a2f007ddc90e0e3f1
SSPSolution/AIDLL/AIComponent.h
SSPSolution/AIDLL/AIComponent.h
#ifndef AIDLL_AI_AICOMPONENT_H #define AIDLL_AI_AICOMPONENT_H #include <DirectXMath.h> enum Pattern : int { AI_LINEAR = 1, AI_CIRCULAR, AI_ROUNTRIP, AI_RANDOM, AI_NONE = -1 }; __declspec(align(16)) struct AIComponent { // System variables int AP_active = 0; int AP_entityID = -1; // AI variables bool AP_triggered; // Trigger handling int AP_time; // How long the component is active float AP_speed; // Movement speed DirectX::XMVECTOR AP_dir; // Normalised direction vector DirectX::XMVECTOR AP_position;// Current position int AP_pattern; // Traversing of waypoints int AP_direction; // Direction in array, might be removed due to AP_pattern's existance int AP_nextWaypointID; // Index to next waypoint int AP_latestWaypointID; // Index to latest visited waypoint int AP_nrOfWaypoint; // Nr of waypoints used in array DirectX::XMVECTOR AP_waypoints[8]; void* operator new(size_t i) { return _aligned_malloc(i, 16); }; void operator delete(void* p) { _aligned_free(p); }; }; #endif
#ifndef AIDLL_AI_AICOMPONENT_H #define AIDLL_AI_AICOMPONENT_H #include <DirectXMath.h> enum Pattern : int { AI_LINEAR = 1, AI_CIRCULAR, AI_ROUNTRIP, AI_RANDOM, AI_NONE = -1 }; __declspec(align(16)) struct AIComponent { // System variables int AP_active = 0; int AP_entityID = -1; // AI variables bool AP_triggered = false; // Trigger handling int AP_time = 0; // How long the component is active float AP_speed = 0; // Movement speed DirectX::XMVECTOR AP_dir = DirectX::XMVECTOR();// Normalised direction vector DirectX::XMVECTOR AP_position = DirectX::XMVECTOR();// Current position int AP_pattern = AI_NONE; // Traversing of waypoints int AP_direction = 0; // Direction in array, might be removed due to AP_pattern's existance int AP_nextWaypointID = 0; // Index to next waypoint int AP_latestWaypointID = 1;// Index to latest visited waypoint int AP_nrOfWaypoint = 0; // Nr of waypoints used in array DirectX::XMVECTOR AP_waypoints[8]; void* operator new(size_t i) { return _aligned_malloc(i, 16); }; void operator delete(void* p) { _aligned_free(p); }; }; #endif
UPDATE AIComp struct to initiate all variables except array
UPDATE AIComp struct to initiate all variables except array
C
apache-2.0
Chringo/SSP,Chringo/SSP
228ad56ee9f8e07cc2b81290d9fb081e36c10c55
libhostile/hostile.h
libhostile/hostile.h
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * * libhostile * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #pragma once #ifdef __cplusplus extern "C" { #endif #if defined(HAVE_LIBHOSTILE) && HAVE_LIBHOSTILE void set_recv_close(bool arg, int frequency, int not_until_arg); void set_send_close(bool arg, int frequency, int not_until_arg); #else #define set_recv_close(__arg, __frequency, __not_until_arg) #define set_send_close(__arg, __frequency, __not_until_arg) #endif #ifdef __cplusplus } #endif
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * * libhostile * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #pragma once #ifdef __cplusplus extern "C" { #endif void set_recv_close(bool arg, int frequency, int not_until_arg); void set_send_close(bool arg, int frequency, int not_until_arg); #ifdef __cplusplus } #endif
Revert changes on .h file.
Revert changes on .h file.
C
bsd-3-clause
beeksiwaais/gearmand,dm/gearmand,dm/gearmand,dm/gearmand,beeksiwaais/gearmand,beeksiwaais/gearmand,beeksiwaais/gearmand,dm/gearmand
45952868429c278087b68d0e0e96f33ec70388fa
webkit/support/webkit_support_gfx.h
webkit/support/webkit_support_gfx.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> // TODO(darin): Remove once this #include has been upstreamed to ImageDiff.cpp. // ImageDiff.cpp expects that PATH_MAX has already been defined :-/ #include <limits.h> namespace webkit_support { // Decode a PNG into an RGBA pixel array. bool DecodePNG(const unsigned char* input, size_t input_size, std::vector<unsigned char>* output, int* width, int* height); // Encode an RGBA pixel array into a PNG. bool EncodeRGBAPNG(const unsigned char* input, int width, int height, int row_byte_width, std::vector<unsigned char>* output); // Encode an BGRA pixel array into a PNG. bool EncodeBGRAPNG(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, std::vector<unsigned char>* output); bool EncodeBGRAPNGWithChecksum(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, const std::string& checksum, std::vector<unsigned char>* output); } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> namespace webkit_support { // Decode a PNG into an RGBA pixel array. bool DecodePNG(const unsigned char* input, size_t input_size, std::vector<unsigned char>* output, int* width, int* height); // Encode an RGBA pixel array into a PNG. bool EncodeRGBAPNG(const unsigned char* input, int width, int height, int row_byte_width, std::vector<unsigned char>* output); // Encode an BGRA pixel array into a PNG. bool EncodeBGRAPNG(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, std::vector<unsigned char>* output); bool EncodeBGRAPNGWithChecksum(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, const std::string& checksum, std::vector<unsigned char>* output); } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_
Remove an include which has been upstreamed to ImageDiff.cpp.
Remove an include which has been upstreamed to ImageDiff.cpp. BUG=none TEST=none Review URL: http://codereview.chromium.org/8392031 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@107382 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
hgl888/chromium-crosswalk-efl,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,keishi/chromium,rogerwang/chromium,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk,keishi/chromium,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,keishi/chromium,robclark/chromium,mogoweb/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,timopulkkinen/BubbleFish,M4sse/chromium.src,keishi/chromium,ondra-novak/chromium.src,ChromiumWebApps/chromium,robclark/chromium,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,markYoungH/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,krieger-od/nwjs_chromium.src,anirudhSK/chromium,dednal/chromium.src,M4sse/chromium.src,Just-D/chromium-1,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,M4sse/chromium.src,M4sse/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,rogerwang/chromium,axinging/chromium-crosswalk,Just-D/chromium-1,zcbenz/cefode-chromium,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,dednal/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,chuan9/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,Chilledheart/chromium,jaruba/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,robclark/chromium,dushu1203/chromium.src,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,keishi/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,keishi/chromium,littlstar/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,chuan9/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,markYoungH/chromium.src,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,dushu1203/chromium.src,Chilledheart/chromium,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,rogerwang/chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,robclark/chromium,littlstar/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,hgl888/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,rogerwang/chromium,robclark/chromium,junmin-zhu/chromium-rivertrail,robclark/chromium,zcbenz/cefode-chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,hgl888/chromium-crosswalk,dednal/chromium.src,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,ltilve/chromium,patrickm/chromium.src,keishi/chromium,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,Jonekee/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,littlstar/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,dednal/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,anirudhSK/chromium,patrickm/chromium.src,hujiajie/pa-chromium,littlstar/chromium.src,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,anirudhSK/chromium,patrickm/chromium.src,Just-D/chromium-1,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,chuan9/chromium-crosswalk,keishi/chromium,ondra-novak/chromium.src,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,rogerwang/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,robclark/chromium,ondra-novak/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,dushu1203/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,rogerwang/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,ltilve/chromium,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,rogerwang/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,robclark/chromium,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,robclark/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,M4sse/chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,anirudhSK/chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,rogerwang/chromium,anirudhSK/chromium,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,littlstar/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,ltilve/chromium,keishi/chromium,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,keishi/chromium,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,patrickm/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk
3afa50dec22e049ab56862b5a16412aec4e79dba
xmas3.c
xmas3.c
/*Build: gcc -std=c99 -o xmas3 xmas3.c*/ #include <stdlib.h> #include <stdio.h> int print_tree(int length) { int i = 0, j = 0; for (i = 0;i<length;i++) { for (j = 0;j<=i;j++) { printf("*"); } printf("\n"); } return 0; } int main(int argc, char*argv[]) { if (argc != 2) { printf("USAGE: %s [length]\n", argv[0]); exit(-1); } int length = atoi(argv[1]); print_tree(length); return 0; }
/*Build: gcc -std=c99 -o xmas3 xmas3.c*/ #include <stdlib.h> #include <stdio.h> #include <string.h> void usage(char *argv0) { printf("USAGE: %s [height] [half|full]\n", argv0); exit(-1); } int print_tree(int height, char half) { int i = 0, j = 0; if (half) // Half tree { for (i = 0;i < height;i++) { for (j = 0;j <= i;j++) { printf("*"); } printf("\n"); } } else if (!half) // full tree { int max_width = 2 * (height - 1) + 1; for (i = 0;i < height;i++) { int width = i + height; for (j = 0;j < width;j++) { if (j < (height-1) - i) printf(" "); else printf("*"); } printf("\n"); } } return 0; } int main(int argc, char *argv[]) { if (argc != 3) usage(argv[0]); int height = atoi(argv[1]); char half = -1; if (!strncmp("half", argv[2], sizeof 4)) half = 1; else if(!strncmp("full", argv[2], sizeof 4)) half = 0; else usage(argv[0]); print_tree(height, half); return 0; }
Add full/half option for tree.
Add full/half option for tree.
C
mit
svagionitis/xmas-tree
7d789e8c0e04aca179ff1f65dfff0ebb3fd066ff
src/m1/protocolo.h
src/m1/protocolo.h
#define PORT 50000 #define TIMEOUT 10; int waitforack(int sock); int sendack(int sock); int senderr(int sock, int ecode); int sendfin(int sock); int getsockfd(); int releasesockfd(int sock);
#define PORT 6012 #define TIMEOUT 10; int waitforack(int sock); int sendConnect(int sock); int sendack(int sock); int senderr(int sock, int ecode); int sendFile(int sock, char * file); int sendfin(int sock); int getsockfd(); int releasesockfd(int sock);
Add missing sendFile function declaration
Add missing sendFile function declaration
C
agpl-3.0
MikelAlejoBR/practica-sd1516
b239023198fbd527d8f3534d3e393e82213d3204
src/lib/hex-dec.c
src/lib/hex-dec.c
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else return 0; } return value; }
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else if (data[i] >= 'a' && data[i] <= 'f') value += data[i]-'a' + 10; else return 0; } return value; }
Allow data to contain also lowercase hex characters.
hex2dec(): Allow data to contain also lowercase hex characters.
C
mit
dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot
51889a9376cf256830db71764c72ef337e644094
src/CpuHelpers.h
src/CpuHelpers.h
#pragma once // This header mainly contains functions needed by both Cpu and Debugger #include "Base.h" // Convenience cast functions template <typename T> constexpr int16_t S16(T v) { return static_cast<int16_t>(v); } template <typename T> constexpr uint16_t U16(T v) { return static_cast<uint16_t>(v); } template <typename T> constexpr uint32_t U32(T v) { return static_cast<uint32_t>(v); } template <typename T> constexpr uint8_t U8(T v) { return static_cast<uint8_t>(v); } // Combine two 8-bit values into a 16-bit value constexpr uint16_t CombineToU16(uint8_t msb, uint8_t lsb) { return U16(msb) << 8 | U16(lsb); } constexpr int16_t CombineToS16(uint8_t msb, uint8_t lsb) { return static_cast<int16_t>(CombineToU16(msb, lsb)); }
#pragma once // This header mainly contains functions needed by both Cpu and Debugger #include "Base.h" #include <type_traits> // Convenience cast functions template <typename T> constexpr int16_t S16(T v) { return static_cast<int16_t>(static_cast<std::make_signed_t<T>>(v)); } template <typename T> constexpr uint16_t U16(T v) { return static_cast<uint16_t>(v); } template <typename T> constexpr uint32_t U32(T v) { return static_cast<uint32_t>(v); } template <typename T> constexpr uint8_t U8(T v) { return static_cast<uint8_t>(v); } // Combine two 8-bit values into a 16-bit value constexpr uint16_t CombineToU16(uint8_t msb, uint8_t lsb) { return U16(msb) << 8 | U16(lsb); } constexpr int16_t CombineToS16(uint8_t msb, uint8_t lsb) { return static_cast<int16_t>(CombineToU16(msb, lsb)); }
Fix indexed mode instructions failing to add negative offset because value would not be correctly sign extended
Cpu: Fix indexed mode instructions failing to add negative offset because value would not be correctly sign extended
C
mit
amaiorano/vectrexy,amaiorano/vectrexy,amaiorano/vectrexy
e4edb986c6acfb48e0d95b845bcdca75595f5308
pevents.h
pevents.h
#pragma once #include <pthread.h> #include <stdint.h> namespace neosmart { struct neosmart_event_t_; typedef neosmart_event_t_ * neosmart_event_t; neosmart_event_t CreateEvent(bool manualReset = false, bool initialState = false); int DestroyEvent(neosmart_event_t event); int WaitForEvent(neosmart_event_t event, uint32_t milliseconds = -1); int SetEvent(neosmart_event_t event); int ResetEvent(neosmart_event_t event); }
#pragma once #include <pthread.h> #include <stdint.h> namespace neosmart { //Type declarations struct neosmart_event_t_; typedef neosmart_event_t_ * neosmart_event_t; //WIN32-style pevent functions neosmart_event_t CreateEvent(bool manualReset = false, bool initialState = false); int DestroyEvent(neosmart_event_t event); int WaitForEvent(neosmart_event_t event, uint32_t milliseconds = -1); int SetEvent(neosmart_event_t event); int ResetEvent(neosmart_event_t event); //posix-style functions //TBD }
Add posix-styled functions for using neosmart_event_t objects
TBD: Add posix-styled functions for using neosmart_event_t objects
C
mit
neosmart/pevents,neosmart/pevents
8bafd7d816991e89b8599aff4f5a1ef6d27dc80e
kerberos5/include/crypto-headers.h
kerberos5/include/crypto-headers.h
/* $FreeBSD$ */ #ifndef __crypto_headers_h__ #define __crypto_headers_h__ #include <openssl/des.h> #include <openssl/rc4.h> #include <openssl/md4.h> #include <openssl/md5.h> #include <openssl/sha.h> #endif /* __crypto_headers_h__ */
/* $FreeBSD$ */ #ifndef __crypto_headers_h__ #define __crypto_headers_h__ #define OPENSSL_DES_LIBDES_COMPATIBILITY #include <openssl/des.h> #include <openssl/rc4.h> #include <openssl/md4.h> #include <openssl/md5.h> #include <openssl/sha.h> #endif /* __crypto_headers_h__ */
Define OPENSSL_DES_LIBDES_COMPATIBILITY so that Heimdal will build with OpenSSL 0.9.7 when it is imported. (This currently has no effect.)
Define OPENSSL_DES_LIBDES_COMPATIBILITY so that Heimdal will build with OpenSSL 0.9.7 when it is imported. (This currently has no effect.)
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
9135a146d451d9e165a81f787e80d6dde9338073
texor.c
texor.c
#include <unistd.h> int main() { char c; while (read(STDIN_FILENO, &c, 1) == 1); return 0; }
#include <unistd.h> int main() { char c; while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q'); return 0; }
Quit after reading a q
Quit after reading a q
C
bsd-2-clause
kyletolle/texor
727917c5605c2e140528a5e7e357cb312757f67f
maximum_pairwise_product.c
maximum_pairwise_product.c
#include <stdio.h> int MaxPairwiseProduct(int* numbers, int sizeofArray) { int result = 0; for (int i = 0; i < sizeofArray; ++i) { for (int j = i + 1; j < sizeofArray; ++j) { if (numbers[i] * numbers[j] > result) { result = numbers[i] * numbers[j]; } } } return result; } int main(void){ int n; char formatter[100]; scanf("%d", &n); int numbers[n], i = 0; while (i < n && scanf("%d", &numbers[i++]) == 1); int result = MaxPairwiseProduct(numbers, n); printf("%d\n", result); return 0; }
#include <stdio.h> long long MaxPairwiseProduct(int* numbers, int sizeofArray) { long long result = 0; for (int i = 0; i < sizeofArray; ++i) { for (int j = i + 1; j < sizeofArray; ++j) { if (((long long)numbers[i]) * numbers[j] > result) { result = ((long long)numbers[i]) * numbers[j]; } } } return result; } int main(void){ int n; char formatter[100]; scanf("%d", &n); int numbers[n], i = 0; while (i < n && scanf("%d", &numbers[i++]) == 1); long long result = MaxPairwiseProduct(numbers, n); printf("%lld\n", result); return 0; }
Change result data type to long long
Change result data type to long long
C
mit
sai-y/coursera_algorithmic_toolbox
04d4d10ab5ebb92244f07cf43ff9e89fcd548a44
Stripe/PublicHeaders/STPPaymentIntentSourceActionAuthorizeWithURL.h
Stripe/PublicHeaders/STPPaymentIntentSourceActionAuthorizeWithURL.h
// // STPPaymentIntentSourceActionAuthorizeWithURL.h // Stripe // // Created by Daniel Jackson on 11/7/18. // Copyright © 2018 Stripe, Inc. All rights reserved. // #import <Foundation/Foundation.h> #import "STPAPIResponseDecodable.h" NS_ASSUME_NONNULL_BEGIN /** The `STPPaymentIntentSourceAction` details when type is `authorize_with_url`. These are created & owned by the containing `STPPaymentIntent`. */ @interface STPPaymentIntentSourceActionAuthorizeWithURL: NSObject<STPAPIResponseDecodable> /** You cannot directly instantiate an `STPPaymentIntentSourceActionAuthorizeWithURL`. */ - (instancetype)init __attribute__((unavailable("You cannot directly instantiate an STPPaymentIntentSourceActionAuthorizeWithURL."))); /** The URL where the user will authorize this charge. */ @property (nonatomic, readonly) NSURL *url; /** The return URL that'll be redirected back to when the user is done authorizing the charge. */ @property (nonatomic, nullable, readonly) NSURL *returnURL; @end NS_ASSUME_NONNULL_END
// // STPPaymentIntentSourceActionAuthorizeWithURL.h // Stripe // // Created by Daniel Jackson on 11/7/18. // Copyright © 2018 Stripe, Inc. All rights reserved. // #import <Foundation/Foundation.h> #import "STPAPIResponseDecodable.h" NS_ASSUME_NONNULL_BEGIN /** The `STPPaymentIntentSourceAction` details when type is `STPPaymentIntentSourceActionTypeAuthorizeWithURL`. These are created & owned by the containing `STPPaymentIntent`. */ @interface STPPaymentIntentSourceActionAuthorizeWithURL: NSObject<STPAPIResponseDecodable> /** You cannot directly instantiate an `STPPaymentIntentSourceActionAuthorizeWithURL`. */ - (instancetype)init __attribute__((unavailable("You cannot directly instantiate an STPPaymentIntentSourceActionAuthorizeWithURL."))); /** The URL where the user will authorize this charge. */ @property (nonatomic, readonly) NSURL *url; /** The return URL that'll be redirected back to when the user is done authorizing the charge. */ @property (nonatomic, nullable, readonly) NSURL *returnURL; @end NS_ASSUME_NONNULL_END
Use SDK's enum value instead of server's string constant in documentation
Use SDK's enum value instead of server's string constant in documentation
C
mit
stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios
75053d92ff35f4b83f7edffe541c2526f04ecf17
arch/x86/libs/thread_x86/incs/ac_thread_stack_min.h
arch/x86/libs/thread_x86/incs/ac_thread_stack_min.h
/* * copyright 2015 wink saville * * licensed under the apache license, version 2.0 (the "license"); * you may not use this file except in compliance with the license. * you may obtain a copy of the license at * * http://www.apache.org/licenses/license-2.0 * * unless required by applicable law or agreed to in writing, software * distributed under the license is distributed on an "as is" basis, * without warranties or conditions of any kind, either express or implied. * see the license for the specific language governing permissions and * limitations under the license. */ #ifndef SADIE_ARCH_X86_LIBS_AC_THREAD_INCS_AC_THREAD_STACK_MIN_H #define SADIE_ARCH_X86_LIBS_AC_THREAD_INCS_AC_THREAD_STACK_MIN_H #define AC_THREAD_STACK_MIN 0x100 #endif
/* * copyright 2015 wink saville * * licensed under the apache license, version 2.0 (the "license"); * you may not use this file except in compliance with the license. * you may obtain a copy of the license at * * http://www.apache.org/licenses/license-2.0 * * unless required by applicable law or agreed to in writing, software * distributed under the license is distributed on an "as is" basis, * without warranties or conditions of any kind, either express or implied. * see the license for the specific language governing permissions and * limitations under the license. */ #ifndef SADIE_ARCH_X86_LIBS_AC_THREAD_INCS_AC_THREAD_STACK_MIN_H #define SADIE_ARCH_X86_LIBS_AC_THREAD_INCS_AC_THREAD_STACK_MIN_H #define AC_THREAD_STACK_MIN 0x1000 #endif
Increase x86 AC_THREAD_STACK_MIN to 4K from 256 bytes just incase
Increase x86 AC_THREAD_STACK_MIN to 4K from 256 bytes just incase
C
apache-2.0
winksaville/sadie,winksaville/sadie
d558b32f61aa23fa9237d875e59b5acec4dcb4e6
include/IrcCore/irccore.h
include/IrcCore/irccore.h
#include "irc.h" #include "irccommand.h" #include "ircconnection.h" #include "ircglobal.h" #include "ircmessage.h" #include "ircfilter.h" #include "ircnetwork.h"
#include "irc.h" #include "irccommand.h" #include "ircconnection.h" #include "ircglobal.h" #include "ircmessage.h" #include "ircfilter.h" #include "ircnetwork.h" #include "ircprotocol.h"
Include ircprotocol.h in the IrcCore module header
Include ircprotocol.h in the IrcCore module header
C
bsd-3-clause
jpnurmi/libcommuni,jpnurmi/libcommuni,communi/libcommuni,communi/libcommuni
809e023343ae13d40f21e4d03ff7b09b5ecf005a
device/vibration/vibration_manager_impl_android.h
device/vibration/vibration_manager_impl_android.h
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_ #define DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_ #include "base/android/jni_android.h" #include "device/vibration/vibration_manager.mojom.h" namespace device { // TODO(timvolodine): consider implementing the VibrationManager mojo service // directly in java, crbug.com/439434. class VibrationManagerImplAndroid : public mojo::InterfaceImpl<VibrationManager> { public: static VibrationManagerImplAndroid* Create(); static bool Register(JNIEnv* env); void Vibrate(int64 milliseconds) override; void Cancel() override; private: VibrationManagerImplAndroid(); virtual ~VibrationManagerImplAndroid(); base::android::ScopedJavaGlobalRef<jobject> j_vibration_provider_; }; } // namespace device #endif // DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_ #define DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_ #include "base/android/jni_android.h" #include "device/vibration/vibration_manager.mojom.h" namespace device { // TODO(timvolodine): consider implementing the VibrationManager mojo service // directly in java, crbug.com/439434. class VibrationManagerImplAndroid : public mojo::InterfaceImpl<VibrationManager> { public: static VibrationManagerImplAndroid* Create(); static bool Register(JNIEnv* env); void Vibrate(int64 milliseconds) override; void Cancel() override; private: VibrationManagerImplAndroid(); ~VibrationManagerImplAndroid() override; base::android::ScopedJavaGlobalRef<jobject> j_vibration_provider_; }; } // namespace device #endif // DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_
Update {virtual,override,final} to follow C++11 style in device.
Update {virtual,override,final} to follow C++11 style in device. The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. This patch was automatically generated with an OS=android build using a variation of https://codereview.chromium.org/598073004. BUG=417463 [email protected] Review URL: https://codereview.chromium.org/902973002 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#315079}
C
bsd-3-clause
chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,Chilledheart/chromium,hgl888/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,ltilve/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,Just-D/chromium-1,Chilledheart/chromium
730f909e146b0ac5dbcf9b8be65cb8f82c68d883
test/CodeGen/x86_64-arguments.c
test/CodeGen/x86_64-arguments.c
// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s && // RUN: grep 'define signext i8 @f0()' %t && // RUN: grep 'define signext i16 @f1()' %t && // RUN: grep 'define i32 @f2()' %t && // RUN: grep 'define float @f3()' %t && // RUN: grep 'define double @f4()' %t && // RUN: grep 'define x86_fp80 @f5()' %t && // RUN: grep 'define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8\* %a4)' %t char f0(void) { } short f1(void) { } int f2(void) { } float f3(void) { } double f4(void) { } long double f5(void) { } void f6(char a0, short a1, int a2, long long a3, void *a4) { }
// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s && // RUN: grep 'define signext i8 @f0()' %t && // RUN: grep 'define signext i16 @f1()' %t && // RUN: grep 'define i32 @f2()' %t && // RUN: grep 'define float @f3()' %t && // RUN: grep 'define double @f4()' %t && // RUN: grep 'define x86_fp80 @f5()' %t && // RUN: grep 'define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8\* %a4)' %t && // RUN: grep 'define void @f7(i32 %a0)' %t char f0(void) { } short f1(void) { } int f2(void) { } float f3(void) { } double f4(void) { } long double f5(void) { } void f6(char a0, short a1, int a2, long long a3, void *a4) { } typedef enum { A, B, C } E; void f7(E a0) { }
Add test for enum types
Add test for enum types git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@65540 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
0fc6d355f3c7bcf56ce20d458d376098a6893884
views/controls/tabbed_pane/tabbed_pane_listener.h
views/controls/tabbed_pane/tabbed_pane_listener.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_ #define VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_ #pragma once namespace views { // An interface implemented by an object to let it know that a tabbed pane was // selected by the user at the specified index. class TabbedPaneListener { public: // Called when the tab at |index| is selected by the user. virtual void TabSelectedAt(int index) = 0; }; } // namespace views #endif // VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_ #define VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_ #pragma once namespace views { // An interface implemented by an object to let it know that a tabbed pane was // selected by the user at the specified index. class TabbedPaneListener { public: // Called when the tab at |index| is selected by the user. virtual void TabSelectedAt(int index) = 0; protected: virtual ~TabbedPaneListener() {} }; } // namespace views #endif // VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_
Add protected virtual destructor to TabbedPaneListener.
views: Add protected virtual destructor to TabbedPaneListener. The use of a protected virtual destructor is to prevent the destruction of a derived object via a base-class pointer. That's it, TabbedPaneListenere should only be deleted through derived class. Example: class FooListener { public: ... protected: virtual ~FooListener() {} }; class Foo : public FooListener { }; FooListener* listener = new Foo; delete listener; // It should prevent this situation! [email protected] Review URL: http://codereview.chromium.org/8028030 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@102916 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium
c304fe7966056ee3e246d69e9e330e048c21031c
support/main.c
support/main.c
/* * Mono managed-to-native support code. * * Author: * Joao Matos ([email protected]) * * (C) 2016 Microsoft, Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "mono_embeddinator.h" int main() { mono_m2n_context_t ctx; mono_m2n_init(&ctx, "mono_embeddinnator"); /* YOUR CODE HERE */ mono_m2n_destroy(&ctx); }
/* * Mono managed-to-native support code. * * Author: * Joao Matos ([email protected]) * * (C) 2016 Microsoft, Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "mono_embeddinator.h" int main() { mono_m2n_context_t ctx = {}; mono_m2n_init(&ctx, "mono_embeddinnator"); /* YOUR CODE HERE */ mono_m2n_destroy(&ctx); }
Initialize the local Mono context struct for deterministic behavior.
Initialize the local Mono context struct for deterministic behavior.
C
mit
jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000
95b99a670df31ca5271f503f378e5cac3aee8f5e
include/net/irda/irlan_filter.h
include/net/irda/irlan_filter.h
/********************************************************************* * * Filename: irlan_filter.h * Version: * Description: * Status: Experimental. * Author: Dag Brattli <[email protected]> * Created at: Fri Jan 29 15:24:08 1999 * Modified at: Sun Feb 7 23:35:31 1999 * Modified by: Dag Brattli <[email protected]> * * Copyright (c) 1998 Dag Brattli, All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Neither Dag Brattli nor University of Troms admit liability nor * provide warranty for any of this software. This material is * provided "AS-IS" and at no charge. * ********************************************************************/ #ifndef IRLAN_FILTER_H #define IRLAN_FILTER_H void irlan_check_command_param(struct irlan_cb *self, char *param, char *value); void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb); void irlan_print_filter(struct seq_file *seq, int filter_type); #endif /* IRLAN_FILTER_H */
/********************************************************************* * * Filename: irlan_filter.h * Version: * Description: * Status: Experimental. * Author: Dag Brattli <[email protected]> * Created at: Fri Jan 29 15:24:08 1999 * Modified at: Sun Feb 7 23:35:31 1999 * Modified by: Dag Brattli <[email protected]> * * Copyright (c) 1998 Dag Brattli, All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Neither Dag Brattli nor University of Troms admit liability nor * provide warranty for any of this software. This material is * provided "AS-IS" and at no charge. * ********************************************************************/ #ifndef IRLAN_FILTER_H #define IRLAN_FILTER_H void irlan_check_command_param(struct irlan_cb *self, char *param, char *value); void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb); #ifdef CONFIG_PROC_FS void irlan_print_filter(struct seq_file *seq, int filter_type); #endif #endif /* IRLAN_FILTER_H */
Fix compile warning when CONFIG_PROC_FS=n
[IRDA] irlan: Fix compile warning when CONFIG_PROC_FS=n include/net/irda/irlan_filter.h:31: warning: 'struct seq_file' declared inside parameter list include/net/irda/irlan_filter.h:31: warning: its scope is only this definition or declaration, which is probably not what you want Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
d1adc4294f0b62951d24ac84f0d397fb0385bf07
src/rest_server/string_piece.h
src/rest_server/string_piece.h
// This file is part of MicroRestD <http://github.com/ufal/microrestd/>. // // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include <cstring> #include <string> namespace ufal { namespace microrestd { struct string_piece { const char* str; size_t len; string_piece() : str(nullptr), len(0) {} string_piece(const char* str) : str(str), len(strlen(str)) {} string_piece(const char* str, size_t len) : str(str), len(len) {} string_piece(const std::string& str) : str(str.c_str()), len(str.size()) {} }; } // namespace microrestd } // namespace ufal
// This file is part of MicroRestD <http://github.com/ufal/microrestd/>. // // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include <cstring> #include <string> namespace ufal { namespace microrestd { struct string_piece { const char* str; size_t len; string_piece() : str(nullptr), len(0) {} string_piece(const char* str) : str(str), len(str ? strlen(str) : 0) {} string_piece(const char* str, size_t len) : str(str), len(len) {} string_piece(const std::string& str) : str(str.c_str()), len(str.size()) {} }; } // namespace microrestd } // namespace ufal
Allow passing nullptr as only const char* argument.
Allow passing nullptr as only const char* argument.
C
mpl-2.0
ufal/microrestd,ufal/microrestd,ufal/microrestd,ufal/microrestd,ufal/microrestd
e1367466f6d7c816d29fd6c103af7875d9855f9b
LYPopView/Classes/LYPopView.h
LYPopView/Classes/LYPopView.h
// // LYPopView.h // LYPOPVIEW // // CREATED BY LUO YU ON 19/12/2016. // COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED. // #import <UIKit/UIKit.h> @interface LYPopView : UIView { CGFloat padding; CGFloat cornerRadius; CGFloat maxHeight; __weak UIView *vCont; } @property (nonatomic, strong) NSString *title; @property (nonatomic, assign) BOOL autoDismiss; - (void)show; - (NSDictionary *)configurations; @end
// // LYPopView.h // LYPOPVIEW // // CREATED BY LUO YU ON 19/12/2016. // COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED. // #import <UIKit/UIKit.h> @interface LYPopView : UIView { CGFloat padding; CGFloat cornerRadius; CGFloat maxHeight; __weak UIView *vCont; } @property (nonatomic, strong) NSString *title; @property (nonatomic, assign) BOOL autoDismiss; - (void)show; - (void)dismiss; - (NSDictionary *)configurations; @end
Modify : enable dismiss method
Modify : enable dismiss method
C
mit
blodely/LYPopView,blodely/LYPopView
dfdb3a90d41a8d784e39321f64f2c9cca2bbcfb3
proxygen/lib/utils/test/MockTime.h
proxygen/lib/utils/test/MockTime.h
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <glog/logging.h> #include <proxygen/lib/utils/Time.h> namespace proxygen { class MockTimeUtil : public TimeUtil { public: void advance(std::chrono::milliseconds ms) { t_ += ms; } void setCurrentTime(TimePoint t) { CHECK(t.time_since_epoch() > t_.time_since_epoch()) << "Time can not move backwards"; t_ = t; } void verifyAndClear() { } TimePoint now() const override { return t_; } private: TimePoint t_; }; }
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <glog/logging.h> #include <proxygen/lib/utils/Time.h> namespace proxygen { template <typename ClockType = std::chrono::steady_clock> class MockTimeUtilGeneric : public TimeUtilGeneric<ClockType> { public: void advance(std::chrono::milliseconds ms) { t_ += ms; } void setCurrentTime(std::chrono::time_point<ClockType> t) { CHECK(t.time_since_epoch() > t_.time_since_epoch()) << "Time can not move backwards"; t_ = t; } void verifyAndClear() { } std::chrono::time_point<ClockType> now() const override { return t_; } private: std::chrono::time_point<ClockType> t_; }; using MockTimeUtil = MockTimeUtilGeneric<>; }
Expire cached TLS session tickets using tlsext_tick_lifetime_hint
Expire cached TLS session tickets using tlsext_tick_lifetime_hint Summary: Our current TLS cache in liger does not respect timeout hints. We should start doing that because it will limit certain kinds of attacks if an attacker gets access to a master key. Test Plan: Added new test in SSLSessionPersistentCacheTest to test expiration Reviewed By: [email protected] Subscribers: bmatheny, seanc, yfeldblum, devonharris FB internal diff: D2299744 Tasks: 7633098 Signature: t1:2299744:1439331830:9d0770149e49b6094ca61bac4e1e4ef16938c4dc
C
bsd-3-clause
LilMeyer/proxygen,songfj/proxygen,raphaelamorim/proxygen,raphaelamorim/proxygen,raphaelamorim/proxygen,KublaikhanGeek/proxygen,supriyantomaftuh/proxygen,hiproz/proxygen,pueril/proxygen,hongliangzhao/proxygen,raphaelamorim/proxygen,Werror/proxygen,chenmoshushi/proxygen,supriyantomaftuh/proxygen,hiproz/proxygen,jgli/proxygen,chenmoshushi/proxygen,Orvid/proxygen,chenmoshushi/proxygen,LilMeyer/proxygen,hnutank163/proxygen,zhiweicai/proxygen,songfj/proxygen,jgli/proxygen,KublaikhanGeek/proxygen,hiproz/proxygen,Werror/proxygen,songfj/proxygen,hongliangzhao/proxygen,zhiweicai/proxygen,pueril/proxygen,supriyantomaftuh/proxygen,Werror/proxygen,pueril/proxygen,zhiweicai/proxygen,Orvid/proxygen,hnutank163/proxygen,hiproz/proxygen,KublaikhanGeek/proxygen,jgli/proxygen,jgli/proxygen,hongliangzhao/proxygen,hnutank163/proxygen,fqihangf/proxygen,KublaikhanGeek/proxygen,chenmoshushi/proxygen,fqihangf/proxygen,fqihangf/proxygen,pueril/proxygen,supriyantomaftuh/proxygen,Orvid/proxygen,hongliangzhao/proxygen,zhiweicai/proxygen,LilMeyer/proxygen,Werror/proxygen,LilMeyer/proxygen,fqihangf/proxygen,Orvid/proxygen,songfj/proxygen,hnutank163/proxygen
429d29660bfd271aa842626dc8d705f64f407396
include/atoms/numeric/rolling_average.h
include/atoms/numeric/rolling_average.h
#pragma once // This file is part of 'Atoms' library - https://github.com/yaqwsx/atoms // Author: Jan 'yaqwsx' Mrázek #include <array> #include <initializer_list> #include <algorithm> namespace atoms { template <class T, size_t SIZE> class RollingAverage { public: RollingAverage() : sum(0), index(0) { std::fill(values.begin(), values.end(), T(0)); }; void push(const T& t) { sum += t - values[index]; values[index] = t; index++; if (index == SIZE) index = 0; } T get_average() { return sum / T(SIZE); } T get_sum() { return sum; } void clear(T t = 0) { std::fill(values.begin(), values.end(), t); sum = t * SIZE; } private: std::array<T, SIZE> values; T sum; size_t index; }; }
#pragma once // This file is part of 'Atoms' library - https://github.com/yaqwsx/atoms // Author: Jan 'yaqwsx' Mrázek #include <array> #include <initializer_list> #include <algorithm> namespace atoms { template <class T, size_t SIZE> class RollingAverage { public: RollingAverage() : sum(0), index(0) { std::fill(begin(), end(), T(0)); }; void push(const T& t) { sum += t - values[index]; values[index] = t; index++; if (index == SIZE) index = 0; } T get_average() { return sum / T(SIZE); } T get_sum() { return sum; } void clear(T t = 0) { std::fill(begin(), end(), t); sum = t * SIZE; } T *begin() { return values; } T *end() { return values + SIZE; } private: T values[ SIZE ]; T sum; size_t index; }; }
Remove std::array dependency of RollingAverage
Remove std::array dependency of RollingAverage This makes it compatible with MCUs without STL.
C
mit
yaqwsx/atoms
bf3a60b17fa0a12bc7a548e9c659f45684742258
test/CodeGen/pointer-signext.c
test/CodeGen/pointer-signext.c
// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s // Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't // cause any sign extensions. // CHECK: [[P:%.*]] = add i64 %param, -8 // CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*]] // CHECK-NEXT: {{%.*}} = getelementptr inbounds [[R]] [[Q]], i64 0, i32 0 #define CR(Record, TYPE, Field) \ ((TYPE *) ((unsigned char *) (Record) - (unsigned char *) &(((TYPE *) 0)->Field))) typedef struct _LIST_ENTRY { struct _LIST_ENTRY *ForwardLink; struct _LIST_ENTRY *BackLink; } LIST_ENTRY; typedef struct { unsigned long long Signature; LIST_ENTRY Link; } MEMORY_MAP; int test(unsigned long long param) { LIST_ENTRY *Link; MEMORY_MAP *Entry; Link = (LIST_ENTRY *) param; Entry = CR (Link, MEMORY_MAP, Link); return (int) Entry->Signature; }
// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s // Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't // cause any sign extensions. // CHECK: [[P:%.*]] = add i64 %param, -8 // CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*\*]] // CHECK-NEXT: {{%.*}} = getelementptr inbounds [[R]] [[Q]], i64 0, i32 0 #define CR(Record, TYPE, Field) \ ((TYPE *) ((unsigned char *) (Record) - (unsigned char *) &(((TYPE *) 0)->Field))) typedef struct _LIST_ENTRY { struct _LIST_ENTRY *ForwardLink; struct _LIST_ENTRY *BackLink; } LIST_ENTRY; typedef struct { unsigned long long Signature; LIST_ENTRY Link; } MEMORY_MAP; int test(unsigned long long param) { LIST_ENTRY *Link; MEMORY_MAP *Entry; Link = (LIST_ENTRY *) param; Entry = CR (Link, MEMORY_MAP, Link); return (int) Entry->Signature; }
Tweak regex not to accidentally match a trailing \r.
Tweak regex not to accidentally match a trailing \r. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@113966 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
0e59e34d8ed15480bd61595be1e98b387770676e
pywal/templates/colors-wal-st.h
pywal/templates/colors-wal-st.h
const char *colorname[] = {{ /* 8 normal colors */ [0] = "{color0}", /* black */ [1] = "{color1}", /* red */ [2] = "{color2}", /* green */ [3] = "{color3}", /* yellow */ [4] = "{color4}", /* blue */ [5] = "{color5}", /* magenta */ [6] = "{color6}", /* cyan */ [7] = "{color7}", /* white */ /* 8 bright colors */ [8] = "{color8}", /* black */ [9] = "{color9}", /* red */ [10] = "{color10}", /* green */ [11] = "{color11}", /* yellow */ [12] = "{color12}", /* blue */ [13] = "{color13}", /* magenta */ [14] = "{color14}", /* cyan */ [15] = "{color15}", /* white */ /* special colors */ [256] = "{background}", /* background */ [257] = "{foreground}", /* foreground */ [258] = "{cursor}", /* cursor */ }}; /* Default colors (colorname index) * foreground, background, cursor */ unsigned int defaultbg = 256; unsigned int defaultfg = 257; unsigned int defaultcs = 258;
const char *colorname[] = {{ /* 8 normal colors */ [0] = "{color0}", /* black */ [1] = "{color1}", /* red */ [2] = "{color2}", /* green */ [3] = "{color3}", /* yellow */ [4] = "{color4}", /* blue */ [5] = "{color5}", /* magenta */ [6] = "{color6}", /* cyan */ [7] = "{color7}", /* white */ /* 8 bright colors */ [8] = "{color8}", /* black */ [9] = "{color9}", /* red */ [10] = "{color10}", /* green */ [11] = "{color11}", /* yellow */ [12] = "{color12}", /* blue */ [13] = "{color13}", /* magenta */ [14] = "{color14}", /* cyan */ [15] = "{color15}", /* white */ /* special colors */ [256] = "{background}", /* background */ [257] = "{foreground}", /* foreground */ [258] = "{cursor}", /* cursor */ }}; /* Default colors (colorname index) * foreground, background, cursor */ unsigned int defaultbg = 0; unsigned int defaultfg = 257; unsigned int defaultcs = 258;
Fix bg color not updating
st: Fix bg color not updating
C
mit
dylanaraps/pywal,dylanaraps/pywal,dylanaraps/pywal
fc1e9dd5a5b313c06c41e25169127f6deedaf164
src/tcp_server.h
src/tcp_server.h
#ifndef QML_SOCKETS_TCP_SERVER #define QML_SOCKETS_TCP_SERVER #include <QtNetwork> #include "tcp.h" class TCPServer : public QObject { Q_OBJECT Q_PROPERTY(uint port MEMBER m_port NOTIFY portChanged) signals: void portChanged(); void clientRead(TCPSocket* client, const QString &message); void clientConnected(TCPSocket* client); void clientDisconnected(TCPSocket* client); public: TCPServer() { m_server = new QTcpServer(this); QObject::connect(m_server, &QTcpServer::newConnection, [=]() { TCPSocket *client = \ new TCPSocket(m_server->nextPendingConnection()); QObject::connect(client, &TCPSocket::read, [=](const QString &message) { emit clientRead(client, message); }); QObject::connect(client, &TCPSocket::disconnected, [=]() { emit clientDisconnected(client); delete client; }); emit clientConnected(client); }); }; ~TCPServer() { } public slots: void listen() { m_server->listen(QHostAddress::Any, m_port); } public: uint m_port; QTcpServer *m_server = NULL; }; #endif
#ifndef QML_SOCKETS_TCP_SERVER #define QML_SOCKETS_TCP_SERVER #include <QtNetwork> #include "tcp.h" class TCPServer : public QObject { Q_OBJECT Q_PROPERTY(uint port MEMBER m_port NOTIFY portChanged) signals: void portChanged(); void clientRead(TCPSocket* client, const QString &message); void clientConnected(TCPSocket* client); void clientDisconnected(TCPSocket* client); public: TCPServer() { m_server = new QTcpServer(this); QObject::connect(m_server, &QTcpServer::newConnection, [=]() { TCPSocket *client = \ new TCPSocket(m_server->nextPendingConnection()); QObject::connect(client, &TCPSocket::read, [=](const QString &message) { emit clientRead(client, message); }); QObject::connect(client, &TCPSocket::disconnected, [=]() { emit clientDisconnected(client); delete client; }); emit clientConnected(client); }); }; ~TCPServer() { delete m_server; m_server = NULL; } public slots: void listen() { m_server->listen(QHostAddress::Any, m_port); } public: uint m_port; QTcpServer *m_server = NULL; }; #endif
Add deletion of m_server from TCPServer in destructor
Add deletion of m_server from TCPServer in destructor --HG-- extra : amend_source : 0364038a316b4f2a036025a5e896379ac29f77c5
C
mit
jemc/qml-sockets,jemc/qml-sockets
ea2a841e4ba38300d287052d96cb397d4f4a7cf5
jni/shaders/displayFrag.h
jni/shaders/displayFrag.h
/* * Copyright (c) 2015 Ivan Valiulin * * This file is part of viaVR. * * viaVR is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation, either * version 2.1 of the License, or (at your option) any later version. * * viaVR is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with viaVR. If not, see http://www.gnu.org/licenses */ R"(#version 300 es precision mediump float; uniform sampler2D video; in vec2 coord; out vec4 outColor; void main () { outColor = texture (video, coord); })";
/* * Copyright (c) 2015 Ivan Valiulin * * This file is part of viaVR. * * viaVR is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation, either * version 2.1 of the License, or (at your option) any later version. * * viaVR is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with viaVR. If not, see http://www.gnu.org/licenses */ R"(#version 300 es precision highp float; uniform sampler2D video; in vec2 coord; out vec4 outColor; void main () { outColor = texture (video, coord); })";
Switch display fragment shader to highp
Switch display fragment shader to highp
C
lgpl-2.1
vivan000/viaVR,vivan000/viaVR
9802ec76a7c900a7fffa37df75e68f51c9e1288c
test/test_sock.c
test/test_sock.c
// Copyright (c) 2014-2017, NetApp, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #include "common.h" int main(void) { init(); io(111111); cleanup(); }
// Copyright (c) 2014-2017, NetApp, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #include "common.h" int main(void) { init(); io(8); cleanup(); }
Use a saner test size
Use a saner test size
C
bsd-2-clause
NTAP/warpcore,NTAP/warpcore,NTAP/warpcore,NTAP/warpcore
145358e9c07bad314111000776ea0d42b97461d0
MGSFragariaPrefsViewController.h
MGSFragariaPrefsViewController.h
// // MGSFragariaPrefsViewController.h // Fragaria // // Created by Jonathan on 22/10/2012. // // #import <Cocoa/Cocoa.h> /** * MGSFragariaPrefsViewController provides a base class for other Fragaria * preferences controllers. It is not implemented directly anywhere. * @see MGSFragariaFontsAndColorsPrefsViewController.h * @see MGSFragariaTextEditingPrefsViewController.h **/ @interface MGSFragariaPrefsViewController : NSViewController <NSTabViewDelegate> /** * Commit edits, discarding changes on error. **/ - (BOOL)commitEditingAndDiscard:(BOOL)discard; @end
// // MGSFragariaPrefsViewController.h // Fragaria // // Created by Jonathan on 22/10/2012. // // #import <Cocoa/Cocoa.h> /** * MGSFragariaPrefsViewController provides a base class for other Fragaria * preferences controllers. It is not implemented directly anywhere. * @see MGSFragariaFontsAndColoursPrefsViewController * @see MGSFragariaTextEditingPrefsViewController **/ @interface MGSFragariaPrefsViewController : NSViewController <NSTabViewDelegate> /** * Commit edits, discarding changes on error. * @param discard indicates whether or not to discard current uncommitted changes. **/ - (BOOL)commitEditingAndDiscard:(BOOL)discard; @end
Add @param description for AppleDoc.
Add @param description for AppleDoc.
C
apache-2.0
shysaur/Fragaria,shysaur/Fragaria,vakoc/Fragaria,shysaur/Fragaria,shysaur/Fragaria,bitstadium/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,bitstadium/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,vakoc/Fragaria
ab5bc2ec06f22d90a0529531ae6c2f19a359ad83
tests/argparse.c
tests/argparse.c
#include "common.h" static void args_empty(void **state) { args *args = *state; assert_null(args->opts); assert_null(args->operands); } static void add_option_passed_null(void **state) { args *args = *state; assert_int_equal( ARGPARSE_PASSED_NULL, args_add_option(args, NULL) ); } static void empty_option_fail(void **state) { args *args = *state; option *opt = option_new("", "", ""); assert_int_equal( ARGPARSE_EMPTY_OPTION, args_add_option(args, opt) ); option_free(opt); } static void add_operand_passed_null(void **state) { args *args = *state; assert_int_equal( ARGPARSE_PASSED_NULL, args_add_operand(args, NULL) ); } int main() { const struct CMUnitTest tests[] = { cmocka_unit_test(args_empty), cmocka_unit_test(add_option_passed_null), cmocka_unit_test(empty_option_fail), cmocka_unit_test(add_operand_passed_null), }; return cmocka_run_group_tests(tests, common_setup, common_teardown); }
#include "common.h" static void args_empty(void **state) { args *args = *state; assert_null(args->opts); assert_null(args->operands); } static void add_option_passed_null(void **state) { args *args = *state; assert_int_equal( ARGPARSE_PASSED_NULL, args_add_option(args, NULL) ); } static void empty_option_fail(void **state) { args *args = *state; option *opt = option_new("", "", ""); assert_int_equal( ARGPARSE_EMPTY_OPTION, args_add_option(args, opt) ); option_free(opt); } static void add_operand_passed_null(void **state) { args *args = *state; assert_int_equal( ARGPARSE_PASSED_NULL, args_add_operand(args, NULL) ); } int main() { #define TEST(test) cmocka_unit_test_setup_teardown( \ test, \ common_setup, \ common_teardown \ ) const struct CMUnitTest tests[] = { TEST(args_empty), TEST(add_option_passed_null), TEST(empty_option_fail), TEST(add_operand_passed_null), }; return cmocka_run_group_tests(tests, NULL, NULL); }
Use a TEST() macro to run common_{setup,teardown}
Use a TEST() macro to run common_{setup,teardown}
C
mit
ntnn/libargparse,ntnn/libargparse
c5c547e1faeeb300fb7a7d4976f561bb01496cad
libgo/runtime/rtems-task-variable-add.c
libgo/runtime/rtems-task-variable-add.c
/* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS. Copyright 2010 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <rtems/error.h> #include <rtems/system.h> #include <rtems/rtems/tasks.h> /* RTEMS does not support GNU TLS extension __thread. */ void __wrap_rtems_task_variable_add (void **var) { rtems_status_code sc = rtems_task_variable_add (RTEMS_SELF, var, NULL); if (sc != RTEMS_SUCCESSFUL) { rtems_error (sc, "rtems_task_variable_add failed"); } }
/* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS. Copyright 2010 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <assert.h> #include <rtems/error.h> #include <rtems/system.h> #include <rtems/rtems/tasks.h> /* RTEMS does not support GNU TLS extension __thread. */ void __wrap_rtems_task_variable_add (void **var) { rtems_status_code sc = rtems_task_variable_add (RTEMS_SELF, var, NULL); if (sc != RTEMS_SUCCESSFUL) { rtems_error (sc, "rtems_task_variable_add failed"); assert (0); } }
Add assert on rtems_task_variable_add error.
Add assert on rtems_task_variable_add error. assert is used so that if rtems_task_variable_add fails, the error is fatal. R=iant CC=gofrontend-dev, joel.sherrill https://golang.org/cl/1684053
C
bsd-3-clause
qskycolor/gofrontend,golang/gofrontend,golang/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,golang/gofrontend,anlhord/gofrontend,golang/gofrontend,anlhord/gofrontend
620f4455db93c0c049eb7854004bc9a761ada889
CommandReturn.h
CommandReturn.h
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2011 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma once #ifndef TUVOK_COMMAND_H #define TUVOK_COMMAND_H namespace tuvok { /// Return value for an executed Command. class CommandReturn { public: virtual ~CommandReturn() {} }; } #endif /* TUVOK_COMMAND_H */
Add empty shell for return value of a command.
Add empty shell for return value of a command. git-svn-id: 0a20d38d1bcdb3210d244a647211d61b0aabf366@152 5b8196f7-c1c0-4be6-8b13-4feed349168d
C
mit
BlueBrain/Tuvok,BlueBrain/Tuvok,BlueBrain/Tuvok
d544c99984735652807614ab04157e180eadfbe6
utility/filter.h
utility/filter.h
#ifndef _FILTER_H #define _FILTER_H #include <math.h> #if (ARDUINO >= 100) #include "Arduino.h" #else #include "WProgram.h" #endif #include "quaternion.h" #define RAD_TO_DEG (180.0 / PI) class Filter { public: Filter(void); void setAccelXYZ(const float x, const float y, const float z); void setCompassXYZ(const float x, const float y, const float z); void setGyroXYZ(const float x, const float y, const float z); virtual void process(void) = 0; protected: float _accelData[3]; float _compassData[3]; float _gyroData[3]; }; #endif
#ifndef _FILTER_H #define _FILTER_H #include <math.h> #if !defined(_FUSION_TEST) #if (ARDUINO >= 100) #include "Arduino.h" #else #include "WProgram.h" #endif #else #define PI (M_PI) #endif #include "quaternion.h" #define RAD_TO_DEG (180.0F / PI) class Filter { public: Filter(void); void setAccelXYZ(const float x, const float y, const float z); void setCompassXYZ(const float x, const float y, const float z); void setGyroXYZ(const float x, const float y, const float z); virtual void process(void) = 0; protected: float _accelData[3]; float _compassData[3]; float _gyroData[3]; }; #endif
Allow for native unit testing
Allow for native unit testing
C
mit
JCube001/Fusion,JCube001/Fusion
3e33a238f6952281cd48308d2b4ad78d2429ab7f
src/common/types.h
src/common/types.h
#ifndef __TYPES_H__ #define __TYPES_H__ typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; typedef unsigned short uint16_t; typedef signed long int32_t; typedef unsigned long uint32_t; typedef signed long long int64_t; typedef unsigned long uint64_t; typedef float float32_t; typedef double float64_t; typedef int bool_t; typedef unsigned int size_t; typedef int32_t error_t; typedef void* handle_t; #define TRUE (1) #define FALSE (0) #define OK (0) #define NG (-1) #define NULL (void*)(0) #define PACK(a, b, c, d) (uint32_t)(((a)<<24) | ((b)<<16) | ((c)<<8) | (d)) #define NULL_SIGNATURE 0x00000000 #endif /* __TYPES_H__ */
#ifndef __TYPES_H__ #define __TYPES_H__ #include <stddef.h> typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; typedef unsigned short uint16_t; typedef signed long int32_t; typedef unsigned long uint32_t; typedef signed long long int64_t; typedef unsigned long uint64_t; typedef float float32_t; typedef double float64_t; typedef int bool_t; typedef int32_t error_t; typedef void* handle_t; #define TRUE (1) #define FALSE (0) #define OK (0) #define NG (-1) #define PACK(a, b, c, d) (uint32_t)(((a)<<24) | ((b)<<16) | ((c)<<8) | (d)) #define NULL_SIGNATURE 0x00000000 #endif /* __TYPES_H__ */
Include <stddef.h> for size_t and NULL definitions
Include <stddef.h> for size_t and NULL definitions
C
mit
ryochack/emkit,ryochack/emkit
05a325ddbe1257fe357238096b615ec0f34f0be7
solutions/uri/1003/1003.c
solutions/uri/1003/1003.c
#include <stdio.h> int main() { int a, b; scanf("%d", &a); scanf("%d", &b); printf("SOMA = %d\n", a + b); return 0; }
Solve Simple Sum in c
Solve Simple Sum in c
C
mit
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground
45f70c28cd7f507416aa3753f451f9e84531cd4b
test/Driver/masm.c
test/Driver/masm.c
// REQUIRES: x86-registered-target // RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s // RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s // RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s // RUN: %clang -target arm-unknown-eabi -masm=intel %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-ARM %s int f() { // CHECK-ATT: movl $0, %eax // CHECK-INTEL: mov eax, 0 // CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm=' // CHECK-ARM: warning: argument unused during compilation: '-masm=intel' return 0; }
// REQUIRES: x86-registered-target // RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s // RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s // RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s // REQUIRES: arm-registered-target // RUN: %clang -target arm-unknown-eabi -masm=intel %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-ARM %s int f() { // CHECK-ATT: movl $0, %eax // CHECK-INTEL: mov eax, 0 // CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm=' // CHECK-ARM: warning: argument unused during compilation: '-masm=intel' return 0; }
Add a requires for the arm-registered-target needed by this test as well.
Add a requires for the arm-registered-target needed by this test as well. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@208722 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
3542ea8ea886bd131aae83198be9bf45585c83fc
s.getcur.c
s.getcur.c
/* Use the ESC [6n escape sequence to query the horizontal cursor position * and return it. On error -1 is returned, on success the position of the * cursor is stored at *rows and *cols and 0 is returned. */ int getCursorPosition(int ifd, int ofd, int *rows, int *cols) { char buf[32]; unsigned int i = 0; /* Report cursor location */ if (write(ofd, "\x1b[6n", 4) != 4) return -1; /* Read the response: ESC [ rows ; cols R */ while (i < sizeof(buf)-1) { if (read(ifd,buf+i,1) != 1) break; if (buf[i] == 'R') break; i++; } buf[i] = '\0'; /* Parse it. */ if (buf[0] != ESC || buf[1] != '[') return -1; if (sscanf(buf+2,"%d;%d",rows,cols) != 2) return -1; return 0; } /* Try to get the number of columns in the current terminal. If the ioctl() * call fails the function will try to query the terminal itself. * Returns 0 on success, -1 on error. */ int getWindowSize(int ifd, int ofd, int *rows, int *cols) { struct winsize ws; if (ioctl(1, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0) { /* ioctl() failed. Try to query the terminal itself. */ int orig_row, orig_col, retval; /* Get the initial position so we can restore it later. */ retval = getCursorPosition(ifd,ofd,&orig_row,&orig_col); if (retval == -1) goto failed; /* Go to right/bottom margin and get position. */ if (write(ofd,"\x1b[999C\x1b[999B",12) != 12) goto failed; retval = getCursorPosition(ifd,ofd,rows,cols); if (retval == -1) goto failed; /* Restore position. */ char seq[32]; snprintf(seq,32,"\x1b[%d;%dH",orig_row,orig_col); if (write(ofd,seq,strlen(seq)) == -1) { /* Can't recover... */ } return 0; } else { *cols = ws.ws_col; *rows = ws.ws_row; return 0; } failed: return -1; }
Create extract documenting the idiom for reading the cursor position and for determining the screen size
Create extract documenting the idiom for reading the cursor position and for determining the screen size
C
bsd-2-clause
eingaeph/pip.imbue.hood,eingaeph/pip.imbue.hood
f4e0b21b7318d226591d9410ab3219efa140301e
src/ios/ChromeSocketsTcp.h
src/ios/ChromeSocketsTcp.h
// Copyright (c) 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #import <Foundation/Foundation.h> #import <Cordova/CDVPlugin.h> @class GCDAsyncSocket; @interface ChromeSocketsTcp : CDVPlugin - (NSUInteger)registerAcceptedSocket:(GCDAsyncSocket*)theSocket; @end
// Copyright (c) 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #import <Foundation/Foundation.h> #import <Cordova/CDVPlugin.h> @class GCDAsyncSocket; @interface ChromeSocketsTcp : CDVPlugin - (NSUInteger)registerAcceptedSocket:(GCDAsyncSocket*)theSocket; @end
Fix up missing newlines at eof
Fix up missing newlines at eof
C
bsd-3-clause
MobileChromeApps/cordova-plugin-chrome-apps-sockets-tcp,iDay/cordova-plugin-chrome-apps-sockets-tcp,MobileChromeApps/cordova-plugin-chrome-apps-sockets-tcp,iDay/cordova-plugin-chrome-apps-sockets-tcp
5d0d0204bec5055c968a73e6f0904c0ce69acd5e
tests/exsymtab/43-three-contexts-inline-func-share.c
tests/exsymtab/43-three-contexts-inline-func-share.c
/* * Define an inline function in one context, use in a different context. */ /* uncomment to enable diagnostic output */ // #define DIAG(...) diag(__VA_ARGS__) #include "test_setup.h" char def_code[] = "inline int fib(int n)\n" "{\n" " if (n <= 2)\n" " return 1;\n" " else\n" " return fib(n-1) + fib(n-2);\n" "}\n" ; char using_code[] = "int fib_of_5() {\n" " return fib(5);\n" "}\n" ; int main(int argc, char **argv) { /* ---- Compile the code string with the definition ---- */ TCCState *s1 = tcc_new(); extended_symtab_p my_symtab; setup_and_compile_s1(my_symtab, def_code); SETUP_SECOND_CALLBACK_DATA(); /* ---- Compile the second string ---- */ TCCState *s2 = tcc_new(); setup_and_compile_second_state(s2, using_code); relocate_second_state(s2); /* ---- Check the functionality ---- */ /* Retrieve fib_of_5 directly */ int (*fib_of_5_ptr)() = tcc_get_symbol(s2, "fib_of_5"); if (fib_of_5_ptr == NULL) return -1; pass("Found fib_of_5 function pointer"); /* ---- Make sure the function invocation gives the right answer ---- */ is_i(fib_of_5_ptr(), 5, "Fibonaci function call works"); /* ---- Cleanup ---- */ tcc_delete_extended_symbol_table(my_symtab); tcc_delete(s1); tcc_delete(s2); pass("cleanup"); done_testing(); return 0; }
Add exsymtab test for inline functions
Add exsymtab test for inline functions
C
lgpl-2.1
run4flat/tinycc,run4flat/tinycc,run4flat/tinycc,run4flat/tinycc,run4flat/tinycc
3a5d6ce443bba75acaec05e8a5fe1ba5ad198efc
SignificantSpices/SignificantSpices.h
SignificantSpices/SignificantSpices.h
// // SignificantSpices.h // SignificantSpices // // Created by Jan Nash on 8/7/17. // Copyright © 2017 resmio. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for SignificantSpices. FOUNDATION_EXPORT double SignificantSpicesVersionNumber; //! Project version string for SignificantSpices. FOUNDATION_EXPORT const unsigned char SignificantSpicesVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <SignificantSpices/PublicHeader.h>
// // SignificantSpices.h // SignificantSpices // // Created by Jan Nash on 8/7/17. // Copyright © 2017 resmio. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for SignificantSpices. FOUNDATION_EXPORT double SignificantSpicesVersionNumber; //! Project version string for SignificantSpices. FOUNDATION_EXPORT const unsigned char SignificantSpicesVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <SignificantSpices/PublicHeader.h>
Replace UIKit import with Foundation import
Replace UIKit import with Foundation import
C
mit
resmio/SignificantSpices,resmio/SignificantSpices,resmio/SignificantSpices,resmio/SignificantSpices
8d25dad00bf02b638dba4c901661f8e9b4d6a476
src/main.c
src/main.c
/* * Copyright 2019 Andrey Terekhov, Victor Y. Fadeev * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma comment(linker, "/STACK:268435456") #include "compiler.h" #include "workspace.h" const char *name = "../tests/executable/floatsign.c"; // "../tests/mips/0test.c"; int main(int argc, const char *argv[]) { //printf(""); // Not working without using printf workspace ws = ws_parse_args(argc, argv); if (argc < 2) { ws_add_file(&ws, name); } return compile_to_vm(&ws); }
/* * Copyright 2019 Andrey Terekhov, Victor Y. Fadeev * * 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. */ #ifdef _MSC_VER #pragma comment(linker, "/STACK:268435456") #endif #include "compiler.h" #include "workspace.h" const char *name = "../tests/executable/floatsign.c"; // "../tests/mips/0test.c"; int main(int argc, const char *argv[]) { //printf(""); // Not working without using printf workspace ws = ws_parse_args(argc, argv); if (argc < 2) { ws_add_file(&ws, name); } return compile_to_vm(&ws); }
Disable STACK resizing for non Visual C\C++ compilers
Disable STACK resizing for non Visual C\C++ compilers
C
apache-2.0
andrey-terekhov/RuC,andrey-terekhov/RuC,andrey-terekhov/RuC
4dbebd9e51232cf237c712f624cf1cc76206213a
tools/regression/pipe/pipe-ino.c
tools/regression/pipe/pipe-ino.c
/*- * Copyright (c) 2011 Giovanni Trematerra <[email protected]> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * $FreeBSD$ * Test conformance to stat(2) SUSv4 description: * "For all other file types defined in this volume of POSIX.1-2008, the * structure members st_mode, st_ino, st_dev, st_uid, st_gid, st_atim, * st_ctim, and st_mtim shall have meaningful values ...". * Check that st_dev and st_ino are meaningful. */ #include <sys/types.h> #include <sys/stat.h> #include <err.h> #include <stdio.h> #include <unistd.h> int main(int argc, char **argv) { int pipefd[2]; struct stat st1, st2; if (pipe(pipefd) == -1) err(1, "FAIL: pipe"); if (fstat(pipefd[0], &st1) == -1) err(1, "FAIL: fstat st1"); if (fstat(pipefd[1], &st2) == -1) err(1, "FAIL: fstat st2"); if (st1.st_dev != st2.st_dev || st1.st_dev == 0 || st2.st_dev == 0) { errx(1, "FAIL: wrong dev number %d %d", st1.st_dev, st2.st_dev); } if (st1.st_ino == st2.st_ino) errx(1, "FAIL: inode numbers are equal: %d", st1.st_ino); close(pipefd[0]); close(pipefd[1]); printf("PASS\n"); return (0); }
Add a simple test for pipe inode numbers reported by fstat(2).
Add a simple test for pipe inode numbers reported by fstat(2). Submitted by: gianni MFC after: 1 week
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
2f7055c5932ecc02159be375ebda1eee64665d17
arch/mips/mipssim/sim_cmdline.c
arch/mips/mipssim/sim_cmdline.c
/* * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * */ #include <linux/init.h> #include <linux/string.h> #include <asm/bootinfo.h> extern char arcs_cmdline[]; char * __init prom_getcmdline(void) { return arcs_cmdline; } void __init prom_init_cmdline(void) { char *cp; cp = arcs_cmdline; /* Get boot line from environment? */ *cp = '\0'; }
/* * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * */ #include <linux/init.h> #include <linux/string.h> #include <asm/bootinfo.h> extern char arcs_cmdline[]; char * __init prom_getcmdline(void) { return arcs_cmdline; } void __init prom_init_cmdline(void) { /* XXX: Get boot line from environment? */ }
Fix booting from NFS root
[MIPS] MIPSsim: Fix booting from NFS root MIPSsim probably doesn't have any sort of environment, but writing a zero in it kills even the compiled in command line. This prevents booting via NFS root. Signed-Off-By: Thiemo Seufer <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
fdfc0c5d2056f11021d1b5dcdce4e92728d323a4
akonadi/resources/openchange/lzfu.h
akonadi/resources/openchange/lzfu.h
#include <kdemacros.h> KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp);
/* Copyright (C) Brad Hards <[email protected]> 2007 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <kdemacros.h> KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp);
Add license, to help the GPLV3 zealots.
Add license, to help the GPLV3 zealots. svn path=/trunk/KDE/kdepim/; revision=748604
C
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
3679a62c59dde625a18416f15aadaa6845bc8cfd
NSData+ImageMIMEDetection/NSData+ImageMIMEDetection.h
NSData+ImageMIMEDetection/NSData+ImageMIMEDetection.h
@interface NSData (ImageMIMEDetection) @end
@interface NSData (ImageMIMEDetection) /** Try to deduce the MIME type. @return string representation of detected MIME type. `nil` if not able to detect the MIME type. @see http://en.wikipedia.org/wiki/Internet_media_type */ - (NSString *)tdt_MIMEType; @end
Add interface for the category
Add interface for the category
C
bsd-3-clause
talk-to/NSData-TDTImageMIMEDetection
5210babef0ae86fb3d9dc5bc4991523e5da96117
SmartDeviceLink/SDLSoftButton.h
SmartDeviceLink/SDLSoftButton.h
// SDLSoftButton.h // #import "SDLRPCMessage.h" #import "SDLNotificationConstants.h" #import "SDLRequestHandler.h" @class SDLImage; @class SDLSoftButtonType; @class SDLSystemAction; @interface SDLSoftButton : SDLRPCStruct <SDLRequestHandler> { } - (instancetype)init; - (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler; - (instancetype)initWithDictionary:(NSMutableDictionary *)dict; - (instancetype)initWithType:(SDLSoftButtonType *)tyle text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(SDLSystemAction *)systemAction handler:(SDLRPCNotificationHandler)handler; @property (copy, nonatomic) SDLRPCNotificationHandler handler; @property (strong) SDLSoftButtonType *type; @property (strong) NSString *text; @property (strong) SDLImage *image; @property (strong) NSNumber *isHighlighted; @property (strong) NSNumber *softButtonID; @property (strong) SDLSystemAction *systemAction; @end
// SDLSoftButton.h // #import "SDLRPCMessage.h" #import "SDLNotificationConstants.h" #import "SDLRequestHandler.h" @class SDLImage; @class SDLSoftButtonType; @class SDLSystemAction; @interface SDLSoftButton : SDLRPCStruct <SDLRequestHandler> { } - (instancetype)init; - (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler; - (instancetype)initWithDictionary:(NSMutableDictionary *)dict; - (instancetype)initWithType:(SDLSoftButtonType *)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(SDLSystemAction *)systemAction handler:(SDLRPCNotificationHandler)handler; @property (copy, nonatomic) SDLRPCNotificationHandler handler; @property (strong) SDLSoftButtonType *type; @property (strong) NSString *text; @property (strong) SDLImage *image; @property (strong) NSNumber *isHighlighted; @property (strong) NSNumber *softButtonID; @property (strong) SDLSystemAction *systemAction; @end
Fix typo in initializer property name.
Fix typo in initializer property name.
C
bsd-3-clause
APCVSRepo/sdl_ios,smartdevicelink/sdl_ios,smartdevicelink/sdl_ios,FordDev/sdl_ios,APCVSRepo/sdl_ios,FordDev/sdl_ios,kshala-ford/sdl_ios,davidswi/sdl_ios,kshala-ford/sdl_ios,kshala-ford/sdl_ios,APCVSRepo/sdl_ios,smartdevicelink/sdl_ios,kshala-ford/sdl_ios,FordDev/sdl_ios,smartdevicelink/sdl_ios,FordDev/sdl_ios,davidswi/sdl_ios,kshala-ford/sdl_ios,APCVSRepo/sdl_ios,davidswi/sdl_ios,FordDev/sdl_ios,davidswi/sdl_ios,APCVSRepo/sdl_ios,smartdevicelink/sdl_ios,davidswi/sdl_ios
d4654bbf9f2f710e662e41826f365b294a845fad
cmd/lefty/txtview.h
cmd/lefty/txtview.h
/* $Id$ $Revision$ */ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifdef __cplusplus extern "C" { #endif /* Lefteris Koutsofios - AT&T Bell Laboratories */ #ifndef _TXTVIEW_H #define _TXTVIEW_H void TXTinit(Grect_t); void TXTterm(void); int TXTmode(int argc, lvar_t * argv); int TXTask(int argc, lvar_t * argv); void TXTprocess(int, char *); void TXTupdate(void); void TXTtoggle(int, void *); #endif /* _TXTVIEW_H */ #ifdef __cplusplus } #endif
/* $Id$ $Revision$ */ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifdef __cplusplus extern "C" { #endif /* Lefteris Koutsofios - AT&T Labs Research */ #ifndef _TXTVIEW_H #define _TXTVIEW_H void TXTinit (Grect_t); void TXTterm (void); int TXTmode (int argc, lvar_t *argv); int TXTask (int argc, lvar_t *argv); void TXTprocess (int, char *); void TXTupdate (void); void TXTtoggle (int, void *); #endif /* _TXTVIEW_H */ #ifdef __cplusplus } #endif
Update with new lefty, fixing many bugs and supporting new features
Update with new lefty, fixing many bugs and supporting new features
C
epl-1.0
MjAbuz/graphviz,pixelglow/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,jho1965us/graphviz,kbrock/graphviz,MjAbuz/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,tkelman/graphviz,tkelman/graphviz,tkelman/graphviz,jho1965us/graphviz,jho1965us/graphviz,kbrock/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,MjAbuz/graphviz,ellson/graphviz,BMJHayward/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,BMJHayward/graphviz,kbrock/graphviz,jho1965us/graphviz,ellson/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,BMJHayward/graphviz,pixelglow/graphviz,kbrock/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,kbrock/graphviz
181f2fc186c1580c514a9d86bdc8b07fc0a1a7bf
src/imap/cmd-create.c
src/imap/cmd-create.c
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "mail-namespace.h" #include "commands.h" bool cmd_create(struct client_command_context *cmd) { struct mail_namespace *ns; const char *mailbox, *full_mailbox; bool directory; size_t len; /* <mailbox> */ if (!client_read_string_args(cmd, 1, &mailbox)) return FALSE; full_mailbox = mailbox; ns = client_find_namespace(cmd, &mailbox); if (ns == NULL) return TRUE; len = strlen(full_mailbox); if (len == 0 || full_mailbox[len-1] != ns->sep) directory = FALSE; else { /* name ends with hierarchy separator - client is just informing us that it wants to create children under this mailbox. */ directory = TRUE; mailbox = t_strndup(mailbox, len-1); full_mailbox = t_strndup(full_mailbox, strlen(full_mailbox)-1); } if (!client_verify_mailbox_name(cmd, full_mailbox, FALSE, TRUE)) return TRUE; if (mail_storage_mailbox_create(ns->storage, mailbox, directory) < 0) client_send_storage_error(cmd, ns->storage); else client_send_tagline(cmd, "OK Create completed."); return TRUE; }
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "mail-namespace.h" #include "commands.h" bool cmd_create(struct client_command_context *cmd) { struct mail_namespace *ns; const char *mailbox, *full_mailbox; bool directory; size_t len; /* <mailbox> */ if (!client_read_string_args(cmd, 1, &mailbox)) return FALSE; full_mailbox = mailbox; ns = client_find_namespace(cmd, &mailbox); if (ns == NULL) return TRUE; len = strlen(full_mailbox); if (len == 0 || full_mailbox[len-1] != ns->sep) directory = FALSE; else { /* name ends with hierarchy separator - client is just informing us that it wants to create children under this mailbox. */ directory = TRUE; mailbox = t_strndup(mailbox, strlen(mailbox)-1); full_mailbox = t_strndup(full_mailbox, len-1); } if (!client_verify_mailbox_name(cmd, full_mailbox, FALSE, TRUE)) return TRUE; if (mail_storage_mailbox_create(ns->storage, mailbox, directory) < 0) client_send_storage_error(cmd, ns->storage); else client_send_tagline(cmd, "OK Create completed."); return TRUE; }
CREATE ns_prefix/box/ didn't work right when namespace prefix existed.
CREATE ns_prefix/box/ didn't work right when namespace prefix existed. --HG-- branch : HEAD
C
mit
jwm/dovecot-notmuch,jkerihuel/dovecot,jwm/dovecot-notmuch,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch
035e7732b87e04ebf28e342a21c222afd08cbb0f
Code/Support/Errors.h
Code/Support/Errors.h
// // Errors.h // RestKit // // Created by Blake Watters on 3/25/10. // Copyright 2010 Two Toasters // // 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. // // The error domain for RestKit generated errors extern NSString* const RKRestKitErrorDomain; extern NSString* const RKObjectMapperErrorObjectsKey; typedef enum { RKObjectLoaderRemoteSystemError = 1, RKRequestBaseURLOfflineError = 2, RKRequestUnexpectedResponseError = 3, RKObjectLoaderUnexpectedResponseError = 4 } RKRestKitError;
// // Errors.h // RestKit // // Created by Blake Watters on 3/25/10. // Copyright 2010 Two Toasters // // 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. // // The error domain for RestKit generated errors extern NSString* const RKRestKitErrorDomain; extern NSString* const RKObjectMapperErrorObjectsKey; typedef enum { RKObjectLoaderRemoteSystemError = 1, RKRequestBaseURLOfflineError = 2, RKRequestUnexpectedResponseError = 3, RKObjectLoaderUnexpectedResponseError = 4, RKRequestConnectionTimeoutError = 5 } RKRestKitError;
Add RKRequestConnectionTimeoutError to throw when our connection timeout has been exceeded.
Add RKRequestConnectionTimeoutError to throw when our connection timeout has been exceeded.
C
apache-2.0
nett55/RestKit,fedegasp/RestKit,justinyaoqi/RestKit,concreteinteractive/RestKit,moritzh/RestKit,nett55/RestKit,loverbabyz/RestKit,Juraldinio/RestKit,kevmeyer/RestKit,mumer92/RestKit,wireitcollege/RestKit,concreteinteractive/RestKit,DocuSignDev/RestKit,canaydogan/RestKit,ipmobiletech/RestKit,pat2man/RestKit,wangjiangwen/RestKit,antondarki/RestKit,wuxsoft/RestKit,LiuShulong/RestKit,StasanTelnov/RestKit,timbodeit/RestKit,0x73/RestKit,loverbabyz/RestKit,jrtaal/RestKit,kevmeyer/RestKit,adozenlines/RestKit,hanangellove/RestKit,zhenlove/RestKit,0dayZh/RestKit,goldstar/RestKit,RestKit/RestKit,nphkh/RestKit,lucasecf/RestKit,mcfedr/RestKit,aleufms/RestKit,djz-code/RestKit,HYPERHYPER/RestKit2,Gaantz/RestKit,naqi/RestKit,0dayZh/RestKit,coderChrisLee/RestKit,taptaptap/RestKit,lucasecf/RestKit,mumer92/RestKit,vilinskiy-playdayteam/RestKit,DocuSignDev/RestKit,CodewareTechnology/RestKit,braindata/RestKit-1,paperlesspost/RestKit,nalindz/pulpfiction-RestKit,nett55/RestKit,canaydogan/RestKit,zilaiyedaren/RestKit,loverbabyz/RestKit,HYPERHYPER/RestKit2,thomaschristensen/RestKit,apontador/RestKit,gank0326/restkit,canaydogan/RestKit,pbogdanv/RestKit,apontador/RestKit,RestKit/RestKit,qingsong-xu/RestKit,ChinaPicture/RestKit,sachin-khard/NucRestKit,money-alex2006hw/RestKit,cryptojuice/RestKit,cryptojuice/RestKit,coderChrisLee/RestKit,adozenlines/RestKit,nett55/RestKit,sachin-khard/NucleusRestKit,HarrisLee/RestKit,cnbin/RestKit,ForrestAlfred/RestKit,QLGu/RestKit,goldstar/RestKit,hejunbinlan/RestKit,gauravstomar/RestKit,TheFarm/RestKit,zjh171/RestKit,Juraldinio/RestKit,SuPair/RestKit,ForrestAlfred/RestKit,HarrisLee/RestKit,sachin-khard/NucleusRestKit,braindata/RestKit-1,mumer92/RestKit,ppierson/RestKit,ForrestAlfred/RestKit,percysnoodle/RestKit,youssman/RestKit,coderChrisLee/RestKit,sachin-khard/NucleusRestKit,dx285/RestKit,REXLabsInc/RestKit,ppierson/RestKit,imton/RestKit,oye-lionel/GithubTest,jrtaal/RestKit,common2015/RestKit,baumatron/RestKit,LiuShulong/RestKit,timbodeit/RestKit,qingsong-xu/RestKit,paperlesspost/RestKit,concreteinteractive/RestKit,LiuShulong/RestKit,fhchina/RestKit,Papercloud/RestKit,oligriffiths/RestKit,CenterDevice/RestKit,StasanTelnov/RestKit,RyanCodes/RestKit,cfis/RestKit,gank0326/restkit,money-alex2006hw/RestKit,lmirosevic/RestKit,braindata/RestKit-1,qingsong-xu/RestKit,moneytree/RestKit,antondarki/RestKit,imton/RestKit,baumatron/RestKit,sandyway/RestKit,caamorales/RestKit,CenterDevice/RestKit,nphkh/RestKit,common2015/RestKit,lucasecf/RestKit,wangjiangwen/RestKit,dx285/RestKit,damiannz/RestKit,coderChrisLee/RestKit,QLGu/RestKit,Papercloud/RestKit,canaydogan/RestKit,gank0326/restkit,goldstar/RestKit,QLGu/RestKit,hejunbinlan/RestKit,fhchina/RestKit,oligriffiths/RestKit,justinyaoqi/RestKit,damiannz/RestKit,jonesgithub/RestKit,Bogon/RestKit,zhenlove/RestKit,erichedstrom/RestKit,pbogdanv/RestKit,sachin-khard/NucRestKit,DejaMi/RestKit,Bogon/RestKit,wireitcollege/RestKit,mikarun/RestKit,wyzzarz/RestKit,lucasecf/RestKit,moritzh/RestKit,nphkh/RestKit,oligriffiths/RestKit,DejaMi/RestKit,RyanCodes/RestKit,RyanCodes/RestKit,ForrestAlfred/RestKit,jonesgithub/RestKit,DejaMi/RestKit,Livestream/RestKit,imton/RestKit,goldstar/RestKit,sandyway/RestKit,wuxsoft/RestKit,adozenlines/RestKit,zjh171/RestKit,Juraldinio/RestKit,braindata/RestKit,zilaiyedaren/RestKit,ipmobiletech/RestKit,agworld/RestKit,nett55/RestKit,nphkh/RestKit,samanalysis/RestKit,PonderProducts/RestKit,fhchina/RestKit,Papercloud/RestKit,cnbin/RestKit,hejunbinlan/RestKit,cfis/RestKit,coderChrisLee/RestKit,mberube09/RestKit,jrtaal/RestKit,common2015/RestKit,HYPERHYPER/RestKit2,gauravstomar/RestKit,money-alex2006hw/RestKit,Flutterbee/RestKit,Meihualu/RestKit,djz-code/RestKit,Livestream/RestKit,youssman/RestKit,aleufms/RestKit,percysnoodle/RestKit,zaichang/RestKit,wireitcollege/RestKit,jrtaal/RestKit,apontador/RestKit,ppierson/RestKit,CodewareTechnology/RestKit,HYPERHYPER/RestKit2,zjh171/RestKit,zaichang/RestKit,moritzh/RestKit,damiannz/RestKit,timbodeit/RestKit,nalindz/pulpfiction-RestKit,samanalysis/RestKit,HarrisLee/RestKit,cnbin/RestKit,gauravstomar/RestKit,zilaiyedaren/RestKit,oligriffiths/RestKit,gank0326/restkit,cnbin/RestKit,samanalysis/RestKit,qingsong-xu/RestKit,ForrestAlfred/RestKit,antondarki/RestKit,djz-code/RestKit,mberube09/RestKit,wyzzarz/RestKit,canaydogan/RestKit,percysnoodle/RestKit,timbodeit/RestKit,PonderProducts/RestKit,Papercloud/RestKit,kevmeyer/RestKit,dx285/RestKit,timbodeit/RestKit,sandyway/RestKit,Bogon/RestKit,gauravstomar/RestKit,jonesgithub/RestKit,thomaschristensen/RestKit,PonderProducts/RestKit,kevmeyer/RestKit,Flutterbee/RestKit,wangjiangwen/RestKit,RyanCodes/RestKit,hanangellove/RestKit,fedegasp/RestKit,zhenlove/RestKit,lmirosevic/RestKit,REXLabsInc/RestKit,jrtaal/RestKit,wyzzarz/RestKit,zaichang/RestKit,RyanCodes/RestKit,HYPERHYPER/RestKit2,orta/RestKit,oligriffiths/RestKit,hejunbinlan/RestKit,adozenlines/RestKit,fedegasp/RestKit,forcedotcom/RestKit,0x73/RestKit,ipmobiletech/RestKit,moritzh/RestKit,agworld/RestKit,lucasecf/RestKit,Gaantz/RestKit,mumer92/RestKit,DocuSignDev/RestKit,mikarun/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,cryptojuice/RestKit,ipmobiletech/RestKit,TheFarm/RestKit,samkrishna/RestKit,CodewareTechnology/RestKit,taptaptap/RestKit,wireitcollege/RestKit,hanangellove/RestKit,taptaptap/RestKit,samanalysis/RestKit,youssman/RestKit,imton/RestKit,pbogdanv/RestKit,sandyway/RestKit,mberube09/RestKit,antondarki/RestKit,cnbin/RestKit,Meihualu/RestKit,jonesgithub/RestKit,nphkh/RestKit,justinyaoqi/RestKit,wuxsoft/RestKit,HarrisLee/RestKit,Meihualu/RestKit,0x73/RestKit,oye-lionel/GithubTest,ppierson/RestKit,SuPair/RestKit,justinyaoqi/RestKit,sachin-khard/NucRestKit,zjh171/RestKit,money-alex2006hw/RestKit,0dayZh/RestKit,forcedotcom/RestKit,Flutterbee/RestKit,apontador/RestKit,CodewareTechnology/RestKit,QLGu/RestKit,mavericksunny/RestKit,margarina/RestKit-latest,caamorales/RestKit,QLGu/RestKit,nalindz/pulpfiction-RestKit,Livestream/RestKit,0x73/RestKit,wuxsoft/RestKit,0x73/RestKit,moneytree/RestKit,hanangellove/RestKit,loverbabyz/RestKit,SuPair/RestKit,justinyaoqi/RestKit,0dayZh/RestKit,baumatron/RestKit,margarina/RestKit-latest,REXLabsInc/RestKit,fedegasp/RestKit,vilinskiy-playdayteam/RestKit,caamorales/RestKit,Meihualu/RestKit,mcfedr/RestKit,RestKit/RestKit,ipmobiletech/RestKit,samanalysis/RestKit,damiannz/RestKit,cryptojuice/RestKit,Flutterbee/RestKit,wyzzarz/RestKit,gumdal/RestKit,zilaiyedaren/RestKit,Gaantz/RestKit,braindata/RestKit,zaichang/RestKit,concreteinteractive/RestKit,DejaMi/RestKit,paperlesspost/RestKit,zhenlove/RestKit,ChinaPicture/RestKit,lmirosevic/RestKit,djz-code/RestKit,SuPair/RestKit,dx285/RestKit,lmirosevic/RestKit,erichedstrom/RestKit,moneytree/RestKit,hejunbinlan/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,caamorales/RestKit,braindata/RestKit-1,common2015/RestKit,fedegasp/RestKit,ChinaPicture/RestKit,sachin-khard/NucleusRestKit,moneytree/RestKit,ChinaPicture/RestKit,zilaiyedaren/RestKit,forcedotcom/RestKit,braindata/RestKit-1,HarrisLee/RestKit,CenterDevice/RestKit,ppierson/RestKit,StasanTelnov/RestKit,mavericksunny/RestKit,fhchina/RestKit,Livestream/RestKit,pbogdanv/RestKit,oye-lionel/GithubTest,margarina/RestKit-latest,erichedstrom/RestKit,percysnoodle/RestKit,sachin-khard/NucRestKit,nalindz/pulpfiction-RestKit,lmirosevic/RestKit,common2015/RestKit,LiuShulong/RestKit,thomaschristensen/RestKit,youssman/RestKit,thomaschristensen/RestKit,fhchina/RestKit,baumatron/RestKit,sandyway/RestKit,DejaMi/RestKit,Gaantz/RestKit,zhenlove/RestKit,apontador/RestKit,braindata/RestKit,mumer92/RestKit,forcedotcom/RestKit,naqi/RestKit,pat2man/RestKit,gumdal/RestKit,mberube09/RestKit,Bogon/RestKit,REXLabsInc/RestKit,CenterDevice/RestKit,gank0326/restkit,samkrishna/RestKit,braindata/RestKit,mikarun/RestKit,sachin-khard/NucRestKit,TwinEngineLabs-Engineering/RestKit-TEL,aleufms/RestKit,qingsong-xu/RestKit,aleufms/RestKit,moritzh/RestKit,taptaptap/RestKit,agworld/RestKit,dx285/RestKit,cfis/RestKit,money-alex2006hw/RestKit,margarina/RestKit-latest,aleufms/RestKit,mavericksunny/RestKit,loverbabyz/RestKit,zjh171/RestKit,wangjiangwen/RestKit,wuxsoft/RestKit,mavericksunny/RestKit,paperlesspost/RestKit,TheFarm/RestKit,kevmeyer/RestKit,cryptojuice/RestKit,vilinskiy-playdayteam/RestKit,Gaantz/RestKit,antondarki/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,concreteinteractive/RestKit,damiannz/RestKit,oye-lionel/GithubTest,pat2man/RestKit,hanangellove/RestKit,agworld/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,caamorales/RestKit,moneytree/RestKit,pbogdanv/RestKit,sachin-khard/NucleusRestKit,baumatron/RestKit,Bogon/RestKit,orta/RestKit,pat2man/RestKit,pat2man/RestKit,ChinaPicture/RestKit,mikarun/RestKit,CodewareTechnology/RestKit,wireitcollege/RestKit,Meihualu/RestKit,LiuShulong/RestKit,jonesgithub/RestKit,gumdal/RestKit,youssman/RestKit,mikarun/RestKit,Juraldinio/RestKit,adozenlines/RestKit,samkrishna/RestKit,SuPair/RestKit,gauravstomar/RestKit,wangjiangwen/RestKit,naqi/RestKit,Juraldinio/RestKit,vilinskiy-playdayteam/RestKit,naqi/RestKit,PonderProducts/RestKit,oye-lionel/GithubTest,Papercloud/RestKit,imton/RestKit
d484040a5fc8d8d8a7a6a0239fc3b34486258181
test/CodeGen/2005-07-20-SqrtNoErrno.c
test/CodeGen/2005-07-20-SqrtNoErrno.c
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // llvm.sqrt has undefined behavior on negative inputs, so it is // inappropriate to translate C/C++ sqrt to this. float sqrtf(float x); float foo(float X) { // CHECK: foo // CHECK: call float @sqrtf(float %tmp) readnone // Check that this is marked readonly when errno is ignored. return sqrtf(X); }
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // llvm.sqrt has undefined behavior on negative inputs, so it is // inappropriate to translate C/C++ sqrt to this. float sqrtf(float x); float foo(float X) { // CHECK: foo // CHECK: call float @sqrtf(float % // Check that this is marked readonly when errno is ignored. return sqrtf(X); }
Adjust check for release mode.
Adjust check for release mode. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136158 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,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,apple/swift-clang,llvm-mirror/clang
3c1245b31011d25f7c660592d456cf9109766195
libyaul/math/color.h
libyaul/math/color.h
#ifndef __libfixmath_color_h__ #define __libfixmath_color_h__ #include "fix16.h" typedef union { struct { unsigned int r:5; unsigned int g:5; unsigned int b:5; unsigned int :1; } __packed; uint8_t comp[3]; uint16_t raw; } __aligned (4) color_rgb_t; typedef union { struct { fix16_t h; fix16_t s; fix16_t v; }; fix16_t comp[3]; } __aligned (4) color_fix16_hsv_t; typedef union { struct { uint8_t h; uint8_t s; uint8_t v; }; uint8_t comp[3]; } __aligned (4) color_uint8_hsv_t; extern void color_rgb_hsv_convert(const color_rgb_t *, color_fix16_hsv_t *); extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *, fix16_t, color_fix16_hsv_t *); #endif /* !__libfixmath_color_h__ */
#ifndef __libfixmath_color_h__ #define __libfixmath_color_h__ #include "fix16.h" typedef union { struct { unsigned int :1; unsigned int b:5; unsigned int g:5; unsigned int r:5; } __packed; uint8_t comp[3]; uint16_t raw; } __aligned (4) color_rgb_t; typedef union { struct { fix16_t v; fix16_t s; fix16_t h; }; fix16_t comp[3]; } __aligned (4) color_fix16_hsv_t; typedef union { struct { uint8_t v; uint8_t s; uint8_t h; }; uint8_t comp[3]; } __aligned (4) color_uint8_hsv_t; extern void color_rgb_hsv_convert(const color_rgb_t *, color_fix16_hsv_t *); extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *, fix16_t, color_fix16_hsv_t *); #endif /* !__libfixmath_color_h__ */
Change R and B components
Change R and B components
C
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
56cf12e72964cda321a577fbf5ad1a0aceed9a18
Libraries/PoissionDiskSampling/Include/PoissonDiskSampling.h
Libraries/PoissionDiskSampling/Include/PoissonDiskSampling.h
#ifndef POISSON_DISK_SAMPLING_H #define POISSON_DISK_SAMPLING_H #include <vector> class PoissonDiskSampling { public: PoissonDiskSampling() = default; PoissonDiskSampling(int pointWidth, int pointHeight, double pointMinDist, double pointCount); ~PoissonDiskSampling() = default; PoissonDiskSampling(const PoissonDiskSampling& pds) = delete; PoissonDiskSampling(PoissonDiskSampling&& pds) = delete; PoissonDiskSampling& operator=(const PoissonDiskSampling& rhs) = delete; PoissonDiskSampling& operator=(PoissonDiskSampling&& rhs) = delete; std::vector<std::pair<double, double>> Generate(); struct Point { Point() : x(0.0), y(0.0) { } Point(double _x, double _y) : x(_x), y(_y) { } ~Point() = default; Point(const Point& p) : x(p.x), y(p.y) { } Point(Point&& p) : x(p.x), y(p.y) { } Point& operator=(const Point& rhs) { if (this == &rhs) { return *this; } x = rhs.x; y = rhs.y; return *this; } Point& operator=(Point&& rhs) { if (this == &rhs) { return *this; } x = rhs.x; y = rhs.y; return *this; } int GetGridIndex(double cellSize, int mapWidth) const { int indexX = static_cast<int>(x / cellSize); int indexY = static_cast<int>(y / cellSize); return indexX + indexY * mapWidth; } double Distance(Point p) const { return sqrt((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y)); } double x, y; }; private: std::vector<std::vector<Point*>> m_grid; std::vector<Point> m_process; std::vector<std::pair<double, double>> m_sample; int m_width; int m_height; double m_minDist; int m_pointCount; double m_cellSize; int m_gridWidth; int m_gridHeight; Point GeneratePointAround(Point p) const; bool IsInRectangle(Point p) const; bool IsInNeighbourhood(Point p); std::vector<Point*> GetCellsAround(Point p); }; #endif
Copy Poisson Disk Sampling header file to library folder
Copy Poisson Disk Sampling header file to library folder
C
mit
utilForever/PolyMapGenerator
5a7a1d9b287813559f13298575dba1de09040900
inc/angle.h
inc/angle.h
#pragma once #include <boost/math/constants/constants.hpp> #include "encoder.h" namespace angle { template <typename T> T wrap(T angle) { angle = std::fmod(angle, boost::math::constants::two_pi<T>()); if (angle >= boost::math::constants::pi<T>()) { angle -= boost::math::constants::two_pi<T>(); } if (angle < -boost::math::constants::pi<T>()) { angle += boost::math::constants::two_pi<T>(); } return angle; } /* * Get angle from encoder count (enccnt_t is uint32_t) * Convert angle from enccnt_t (unsigned) to corresponding signed type and use negative * values for any count over half a revolution. */ template <typename T> T encoder_count(const Encoder& encoder) { auto position = static_cast<std::make_signed<enccnt_t>::type>(encoder.count()); auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev); if (position > rev / 2) { position -= rev; } return static_cast<T>(position) / rev * boost::math::constants::two_pi<T>(); } } // namespace angle
#pragma once #include <boost/math/constants/constants.hpp> #include "encoder.h" #include "encoderfoaw.h" namespace angle { template <typename T> T wrap(T angle) { angle = std::fmod(angle, boost::math::constants::two_pi<T>()); if (angle >= boost::math::constants::pi<T>()) { angle -= boost::math::constants::two_pi<T>(); } if (angle < -boost::math::constants::pi<T>()) { angle += boost::math::constants::two_pi<T>(); } return angle; } /* * Get angle from encoder count (enccnt_t is uint32_t) * Convert angle from enccnt_t (unsigned) to corresponding signed type and use negative * values for any count over half a revolution. */ template <typename T> T encoder_count(const Encoder& encoder) { auto position = static_cast<std::make_signed<enccnt_t>::type>(encoder.count()); auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev); if (position > rev / 2) { position -= rev; } return static_cast<T>(position) / rev * boost::math::constants::two_pi<T>(); } template <typename T, size_t N> T encoder_rate(const EncoderFoaw<T, N>& encoder) { auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev); return static_cast<T>(encoder.velocity()) / rev * boost::math::constants::two_pi<T>(); } } // namespace angle
Add function to obtain encoder angular rate
Add function to obtain encoder angular rate Add function to angle namespace to obtain encoder angular rate in rad/s. This requires that the encoder object has a velocity() member function which means only EncoderFoaw for now.
C
bsd-2-clause
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
03b0df95cdef76fcdbad84bb10817733bd03220f
test/CodeGen/unwind-attr.c
test/CodeGen/unwind-attr.c
// RUN: %clang_cc1 -fexceptions -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix NOEXC %s int opaque(); // CHECK: define [[INT:i.*]] @test0() { // CHECK-NOEXC: define [[INT:i.*]] @test0() nounwind { int test0(void) { return opaque(); } // <rdar://problem/8087431>: locally infer nounwind at -O0 // CHECK: define [[INT:i.*]] @test1() nounwind { // CHECK-NOEXC: define [[INT:i.*]] @test1() nounwind { int test1(void) { }
// RUN: %clang_cc1 -fexceptions -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix NOEXC %s int opaque(); // CHECK: define [[INT:i.*]] @test0() { // CHECK-NOEXC: define [[INT:i.*]] @test0() nounwind { int test0(void) { return opaque(); } // <rdar://problem/8087431>: locally infer nounwind at -O0 // CHECK: define [[INT:i.*]] @test1() nounwind { // CHECK-NOEXC: define [[INT:i.*]] @test1() nounwind { int test1(void) { return 0; }
Fix a warning on a test.
Fix a warning on a test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@110165 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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
4450bf39371fd17df18f8eee181a5f77303f5eee
src/medCore/medDataReaderWriter.h
src/medCore/medDataReaderWriter.h
#ifndef MED_DATA_READER_WRITER_H #define MED_DATA_READER_WRITER_H #include <dtkCore/dtkSmartPointer.h> #include <dtkCore/dtkAbstractDataReader.h> #include <dtkCore/dtkAbstractDataWriter.h> #include <dtkCore/dtkAbstractData.h> struct medDataReaderWriter { typedef dtkSmartPointer<dtkAbstractDataReader> Reader; typedef dtkSmartPointer<dtkAbstractDataWriter> Writer; typedef dtkSmartPointer<dtkAbstractData> Data; static Reader reader(const QString& path); static Writer writer(const QString& path,const dtkAbstractData* data); static Data read(const QString& path); static bool write(const QString& path,dtkAbstractData* data); }; #endif // ! MED_DATA_READER_WRITER_H
#ifndef MED_DATA_READER_WRITER_H #define MED_DATA_READER_WRITER_H #include <dtkCore/dtkSmartPointer.h> #include <dtkCore/dtkAbstractDataReader.h> #include <dtkCore/dtkAbstractDataWriter.h> #include <dtkCore/dtkAbstractData.h> #include "medCoreExport.h" struct MEDCORE_EXPORT medDataReaderWriter { typedef dtkSmartPointer<dtkAbstractDataReader> Reader; typedef dtkSmartPointer<dtkAbstractDataWriter> Writer; typedef dtkSmartPointer<dtkAbstractData> Data; static Reader reader(const QString& path); static Writer writer(const QString& path,const dtkAbstractData* data); static Data read(const QString& path); static bool write(const QString& path,dtkAbstractData* data); }; #endif // ! MED_DATA_READER_WRITER_H
Correct for windows compilation (exports)
Correct for windows compilation (exports)
C
bsd-3-clause
NicolasSchnitzler/medInria-public,aabadie/medInria-public,aabadie/medInria-public,rdebroiz/medInria-public,NicolasSchnitzler/medInria-public,rdebroiz/medInria-public,NicolasSchnitzler/medInria-public,rdebroiz/medInria-public,aabadie/medInria-public
7cb013f3d3f72a53c607c45492c26184283ac990
examples/ZXSpectrum/cpusimple.c
examples/ZXSpectrum/cpusimple.c
/* * ZXSpectrum * * Uses Z80 step core built in EDL * Rest is C for now */ #include <stdio.h> #include <stdint.h> void STEP(void); void RESET(void); void INTERRUPT(uint8_t); extern uint8_t CYCLES; void CPU_RESET() { RESET(); } int CPU_STEP(int intClocks,int doDebug) { if (intClocks) { INTERRUPT(0xFF); if (CYCLES==0) { STEP(); } } else { STEP(); } return CYCLES; }
/* * ZXSpectrum * * Uses Z80 step core built in EDL * Rest is C for now */ #include <stdio.h> #include <stdint.h> void STEP(void); void RESET(void); void INTERRUPT(uint8_t); extern uint16_t PC; extern uint8_t CYCLES; int Disassemble(unsigned int address,int registers); void CPU_RESET() { RESET(); } int CPU_STEP(int intClocks,int doDebug) { if (doDebug) { Disassemble(PC,1); } if (intClocks) { INTERRUPT(0xFF); if (CYCLES==0) { STEP(); } } else { STEP(); } return CYCLES; }
Put disassembly into simple core
Put disassembly into simple core
C
mit
SavourySnaX/EDL,SavourySnaX/EDL
44d20ecaf13cb0245ee562d234939e762b5b0921
include/agent.h
include/agent.h
#ifndef AGENT_CPP_H #define AGENT_CPP_H #include <vector> #include "directive.h" // forward declaration namespace Url { class Url; } namespace Rep { class Agent { public: /* The type for the delay. */ typedef float delay_t; /** * Construct an agent. */ explicit Agent(const std::string& host) : directives_(), delay_(-1.0), sorted_(true), host_(host) {} /** * Add an allowed directive. */ Agent& allow(const std::string& query); /** * Add a disallowed directive. */ Agent& disallow(const std::string& query); /** * Set the delay for this agent. */ Agent& delay(delay_t value) { delay_ = value; return *this; } /** * Return the delay for this agent. */ delay_t delay() const { return delay_; } /** * A vector of the directives, in priority-sorted order. */ const std::vector<Directive>& directives() const; /** * Return true if the URL (either a full URL or a path) is allowed. */ bool allowed(const std::string& path) const; std::string str() const; private: bool is_external(const Url::Url& url) const; mutable std::vector<Directive> directives_; delay_t delay_; mutable bool sorted_; std::string host_; }; } #endif
#ifndef AGENT_CPP_H #define AGENT_CPP_H #include <vector> #include "directive.h" // forward declaration namespace Url { class Url; } namespace Rep { class Agent { public: /* The type for the delay. */ typedef float delay_t; /** * Default constructor */ Agent() : Agent("") {} /** * Construct an agent. */ explicit Agent(const std::string& host) : directives_(), delay_(-1.0), sorted_(true), host_(host) {} /** * Add an allowed directive. */ Agent& allow(const std::string& query); /** * Add a disallowed directive. */ Agent& disallow(const std::string& query); /** * Set the delay for this agent. */ Agent& delay(delay_t value) { delay_ = value; return *this; } /** * Return the delay for this agent. */ delay_t delay() const { return delay_; } /** * A vector of the directives, in priority-sorted order. */ const std::vector<Directive>& directives() const; /** * Return true if the URL (either a full URL or a path) is allowed. */ bool allowed(const std::string& path) const; std::string str() const; private: bool is_external(const Url::Url& url) const; mutable std::vector<Directive> directives_; delay_t delay_; mutable bool sorted_; std::string host_; }; } #endif
Add back default constructor for Agent.
Add back default constructor for Agent. Previously, this was removed in #28, but the Cython bindings in reppy *really* want there to be a default constructor, so I'm adding it back for convenience.
C
mit
seomoz/rep-cpp,seomoz/rep-cpp
d799cd9b227334a81c4c98068f09bad8c4be27c1
src/libwatcher/watcherGlobalFunctions.h
src/libwatcher/watcherGlobalFunctions.h
#ifndef WATCHER_GLOBAL_FUNCTIONS #define WATCHER_GLOBAL_FUNCTIONS #include <boost/asio/ip/address.hpp> #include <boost/serialization/split_free.hpp> BOOST_SERIALIZATION_SPLIT_FREE(boost::asio::ip::address); namespace boost { namespace serialization { template<class Archive> void save(Archive & ar, const boost::asio::ip::address & a, const unsigned int version) { std::string tmp=a.to_string(); ar & tmp; } template<class Archive> void load(Archive & ar, boost::asio::ip::address & a, const unsigned int version) { std::string tmp; ar & tmp; a=boost::asio::ip::address::from_string(tmp); } } } #endif // WATCHER_GLOBAL_FUNCTIONS
#ifndef WATCHER_GLOBAL_FUNCTIONS #define WATCHER_GLOBAL_FUNCTIONS #include <boost/serialization/split_free.hpp> #include "watcherTypes.h" BOOST_SERIALIZATION_SPLIT_FREE(boost::asio::ip::address); namespace boost { namespace serialization { template<class Archive> void save(Archive & ar, const watcher::NodeIdentifier &a, const unsigned int version) { std::string tmp=a.to_string(); ar & tmp; } template<class Archive> void load(Archive & ar, watcher::NodeIdentifier &a, const unsigned int version) { std::string tmp; ar & tmp; a=boost::asio::ip::address::from_string(tmp); } } } #endif // WATCHER_GLOBAL_FUNCTIONS
Use watcher::NodeIdentifier in place of boost::asio::address
Use watcher::NodeIdentifier in place of boost::asio::address
C
agpl-3.0
glawler/watcher-visualization,glawler/watcher-visualization,glawler/watcher-visualization,glawler/watcher-visualization,glawler/watcher-visualization
1a78a1e8a8b323fe34ef21e9b4cc8184379809f3
src/JpegEnc/stdafx.h
src/JpegEnc/stdafx.h
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include "targetver.h" #include <stdio.h> #include <tchar.h> // TODO: reference additional headers your program requires here
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include "targetver.h" #include <cassert>
Remove unused headers and add cassert to PCH.
Remove unused headers and add cassert to PCH.
C
bsd-3-clause
dwarfcrank/yolo-dangerzone,dwarfcrank/yolo-dangerzone
c723875e377f92710bae4e55fbafb7ba8ea6220c
src/boundaryCondition.h
src/boundaryCondition.h
/***************************************************************************//** * \file boundaryCondition.h * \author Krishnan, A. ([email protected]) * \brief Definition of the class \c boundaryCondition */ #pragma once #include <string> #include <sstream> #include "types.h" #include "parameterDB.h" /** * \class boundaryCondition * \brief Store the boundary conditions for a given system */ class boundaryCondition { public: bcType type; ///< type of boundary condition real value; ///< numerical value associated with the boundary condition /** * \brief Constructor of the class \c boundaryCondition. * * Initialize with a Dirichlet-type boundary condition * with a value sets to zero. * */ boundaryCondition() : type(DIRICHLET), value(0) {}; /** * \brief Other constructor of the class \c boundaryCondition. * * Initialize with a given boundary condition type * and a given value. * */ boundaryCondition(bcType _type, real _value) : type(_type), value(_value) {}; /*const char *print() { std::stringstream ss; ss << toString(this->type); ss << " : "; ss << this->value; std::string st = ss.str(); //std::cout << st << std::endl; return ss.str().c_str(); }*/ };
/***************************************************************************//** * \file boundaryCondition.h * \author Anush Krishnan ([email protected]) * \brief Definition of the class \c boundaryCondition. */ #pragma once #include <string> #include <sstream> #include "types.h" #include "parameterDB.h" /** * \class boundaryCondition * \brief Stores the boundary conditions for a given system. */ class boundaryCondition { public: bcType type; ///< type of boundary condition real value; ///< numerical value associated with the boundary condition /** * \brief Constructor of the class \c boundaryCondition. * * Boundary condition initialized with a Dirichlet-type with * with a value sets to zero. * */ boundaryCondition() : type(DIRICHLET), value(0) {}; /** * \brief Other constructor of the class \c boundaryCondition. * * Boundary condition initialized with a given type and a given value. * */ boundaryCondition(bcType _type, real _value) : type(_type), value(_value) {}; /*const char *print() { std::stringstream ss; ss << toString(this->type); ss << " : "; ss << this->value; std::string st = ss.str(); //std::cout << st << std::endl; return ss.str().c_str(); }*/ };
Update Doxygen documentation with conventions
Update Doxygen documentation with conventions
C
mit
barbagroup/cuIBM,barbagroup/cuIBM,barbagroup/cuIBM
a7e170979205d11da9e41c4d9c0a032a0f9a6b2b
src/libevent2-emul.h
src/libevent2-emul.h
#ifndef EVENT2_EVENT_H #define EVENT2_EVENT_H #define SJ_LIBEVENT_EMULATION 1 #include <event.h> #include <evutil.h> #include "qt4compat.h" typedef int evutil_socket_t; typedef void(*event_callback_fn)(evutil_socket_t, short, void*); Q_DECL_HIDDEN inline struct event* event_new(struct event_base* base, evutil_socket_t fd, short int events, event_callback_fn callback, void* callback_arg) { struct event* e = new struct event; event_set(e, fd, events, callback, callback_arg); event_base_set(base, e); return e; } Q_DECL_HIDDEN inline void event_free(struct event* e) { delete e; } #endif
#ifndef EVENT2_EVENT_H #define EVENT2_EVENT_H #define SJ_LIBEVENT_EMULATION 1 #include <event.h> #ifndef EV_H_ // libevent emulation by libev # include <evutil.h> #endif #include "qt4compat.h" typedef int evutil_socket_t; typedef void(*event_callback_fn)(evutil_socket_t, short, void*); Q_DECL_HIDDEN inline struct event* event_new(struct event_base* base, evutil_socket_t fd, short int events, event_callback_fn callback, void* callback_arg) { struct event* e = new struct event; event_set(e, fd, events, callback, callback_arg); event_base_set(base, e); return e; } Q_DECL_HIDDEN inline void event_free(struct event* e) { delete e; } #ifdef EV_H_ Q_DECL_HIDDEN inline int event_reinit(struct event_base* base) { Q_UNUSED(base); qWarning("%s emulation is not supported.", Q_FUNC_INFO); return 1; } #define evutil_gettimeofday(tv, tz) gettimeofday((tv), (tz)) #define evutil_timeradd(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp)) #define evutil_timersub(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp)) #define evutil_timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) #endif #endif
Support for libevent emulation with libev
Support for libevent emulation with libev Hello to CentOS where libev-devel cannot coexist with libevent2-devel
C
mit
sjinks/qt_eventdispatcher_libevent,sjinks/qt_eventdispatcher_libevent,sjinks/qt_eventdispatcher_libevent
d828e340a80f268a6e51d451a75fb6c2282e17b1
include/llvm/ADT/HashExtras.h
include/llvm/ADT/HashExtras.h
//===-- llvm/ADT/HashExtras.h - Useful functions for STL hash ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file contains some templates that are useful if you are working with the // STL Hashed containers. // // No library is required when using these functinons. // //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_HASHEXTRAS_H #define LLVM_ADT_HASHEXTRAS_H #include "llvm/ADT/hash_map" #include <string> // Cannot specialize hash template from outside of the std namespace. namespace HASH_NAMESPACE { template <> struct hash<std::string> { size_t operator()(std::string const &str) const { return hash<char const *>()(str.c_str()); } }; // Provide a hash function for arbitrary pointers... template <class T> struct hash<T *> { inline size_t operator()(const T *Val) const { return reinterpret_cast<size_t>(Val); } }; } // End namespace std #endif
//===-- llvm/ADT/HashExtras.h - Useful functions for STL hash ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file contains some templates that are useful if you are working with the // STL Hashed containers. // // No library is required when using these functinons. // //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_HASHEXTRAS_H #define LLVM_ADT_HASHEXTRAS_H #include "llvm/ADT/hash_map" #include <string> // Cannot specialize hash template from outside of the std namespace. namespace HASH_NAMESPACE { // Provide a hash function for arbitrary pointers... template <class T> struct hash<T *> { inline size_t operator()(const T *Val) const { return reinterpret_cast<size_t>(Val); } }; template <> struct hash<std::string> { size_t operator()(std::string const &str) const { return hash<char const *>()(str.c_str()); } }; } // End namespace std #endif
Define the pointer hash struct before the string one, to improve compatibility with ICC. Patch contributed by Bjørn Wennberg.
Define the pointer hash struct before the string one, to improve compatibility with ICC. Patch contributed by Bjørn Wennberg. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@18663 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap
0755c21f72f88bf986ad22c74a31f1c5f610f6c7
TelepathyQt4Yell/Farstream/types.h
TelepathyQt4Yell/Farstream/types.h
/* * This file is part of TelepathyQt4Yell * * Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _TelepathyQt4Yell_Farstream_types_h_HEADER_GUARD_ #define _TelepathyQt4Yell_Farstream_types_h_HEADER_GUARD_ #ifndef IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER #error IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER #endif #include <TelepathyQt4/Types> namespace Tpy { class FarstreamChannelFactory; typedef Tp::SharedPtr<FarstreamChannelFactory> FarstreamChannelFactoryPtr; } // Tpy #endif
/* * This file is part of TelepathyQt4Yell * * Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _TelepathyQt4Yell_Farstream_types_h_HEADER_GUARD_ #define _TelepathyQt4Yell_Farstream_types_h_HEADER_GUARD_ #ifndef IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER #error IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER #endif #include <TelepathyQt4Yell/Types> namespace Tpy { class FarstreamChannelFactory; typedef Tp::SharedPtr<FarstreamChannelFactory> FarstreamChannelFactoryPtr; } // Tpy #endif
Include TelepathyQt4Yell/Types instead of TelepathyQt4/Types.
Farstream/Types: Include TelepathyQt4Yell/Types instead of TelepathyQt4/Types.
C
lgpl-2.1
freedesktop-unofficial-mirror/telepathy__telepathy-qt4-yell,mck182/telepathy-qt4-yell,mck182/telepathy-qt4-yell,mck182/telepathy-qt4-yell,freedesktop-unofficial-mirror/telepathy__telepathy-qt4-yell,freedesktop-unofficial-mirror/telepathy__telepathy-qt4-yell,mck182/telepathy-qt4-yell,freedesktop-unofficial-mirror/telepathy__telepathy-qt4-yell
c13b3fdb2593a7af3281755e2b1ece4dd51ffdb2
reporting.h
reporting.h
/* see LICENSE file for copyright and license details */ /* report errors or warnings */ extern char *argv0; extern int debug; extern int interactive_mode; #define reportprint(E, M, ...) { \ if (debug) \ fprintf(stderr, "%s:%d: %s: " M "\n", __FILE__, __LINE__, \ !E || interactive_mode ? "warning" : "error", ##__VA_ARGS__); \ else \ fprintf(stderr, "%s: " M "\n", argv0, ##__VA_ARGS__); \ } #define reporterr(M, ...) { \ reportprint(1, M, ##__VA_ARGS__); \ exit(1); \ } #define _reporterr(M, ...) { \ reportprint(1, M, ##__VA_ARGS__); \ _exit(1); \ } #define report(M, ...) { \ reportprint(0, M, ##__VA_ARGS__); \ if (!interactive_mode) \ exit(1); \ } #define reportret(R, M, ...) { \ reportprint(0, M, ##__VA_ARGS__); \ if (!interactive_mode) \ exit(1); \ else \ return R; \ } #define reportvar(V, M) { \ V = M; \ return NULL; \ }
/* see LICENSE file for copyright and license details */ /* report errors or warnings */ extern char *argv0; extern int debug; extern int interactive_mode; #define reportprint(E, M, ...) do { \ if (debug) \ fprintf(stderr, "%s:%d: %s: " M "\n", __FILE__, __LINE__, \ !E || interactive_mode ? "warning" : "error", ##__VA_ARGS__); \ else \ fprintf(stderr, "%s: " M "\n", argv0, ##__VA_ARGS__); \ } while(0) #define reporterr(M, ...) do { \ reportprint(1, M, ##__VA_ARGS__); \ exit(1); \ } while(0) #define _reporterr(M, ...) do { \ reportprint(1, M, ##__VA_ARGS__); \ _exit(1); \ } while(0) #define report(M, ...) do { \ reportprint(0, M, ##__VA_ARGS__); \ if (!interactive_mode) \ exit(1); \ } while(0) #define reportret(R, M, ...) do { \ reportprint(0, M, ##__VA_ARGS__); \ if (!interactive_mode) \ exit(1); \ else \ return R; \ } while(0) #define reportvar(V, M) do { \ V = M; \ return NULL; \ } while(0)
Fix report macros in if else statements
Fix report macros in if else statements
C
bsd-3-clause
rain-1/s,rain-1/s,rain-1/s
fd767a1b53b8f2ef3ca484c8bbbcb29ffcc8c3b9
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 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__ */
/* * 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 12 #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 version to 1.12, matching blender 2.83 release cycle
Bump version to 1.12, matching blender 2.83 release cycle
C
apache-2.0
tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird
e0d52710bfa776312443efe3a70e7e0544bb207f
src/fs.h
src/fs.h
// Copyright (c) 2017-2020 The Bitcoin Core developers // Copyright (c) 2020 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_FS_H #define BITCOIN_FS_H #include <stdio.h> #include <string> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/filesystem/detail/utf8_codecvt_facet.hpp> /** Filesystem operations and types */ namespace fs = boost::filesystem; /** Bridge operations to C stdio */ namespace fsbridge { FILE *fopen(const fs::path& p, const char *mode); FILE *freopen(const fs::path& p, const char *mode, FILE *stream); }; #endif
// Copyright (c) 2017-2020 The Bitcoin Core developers // Copyright (c) 2020 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_FS_H #define BITCOIN_FS_H #include <stdio.h> #include <string> #define BOOST_FILESYSTEM_NO_DEPRECATED #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/filesystem/detail/utf8_codecvt_facet.hpp> /** Filesystem operations and types */ namespace fs = boost::filesystem; /** Bridge operations to C stdio */ namespace fsbridge { FILE *fopen(const fs::path& p, const char *mode); FILE *freopen(const fs::path& p, const char *mode, FILE *stream); }; #endif
Enforce that no deprecated boost filesystem methods can be re-introduced
Enforce that no deprecated boost filesystem methods can be re-introduced This macro define will cause compilation errors in the event that any deprecated are re-introduced to the codebase.
C
mit
PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet,Darknet-Crypto/Darknet,PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet
77f2d3fd9da54cb0398fda96cb795b320145ea37
src/array.h
src/array.h
#ifndef ARRAY_H #define ARRAY_H #include <stdlib.h> #define ARRAY_DECLARE(TYPE) \ typedef struct { \ TYPE *elems; \ size_t allocated, \ nextfree; \ } Array##TYPE #define ARRAY_INIT(A, TYPE, SIZE) \ (A)->elems = (TYPE*)malloc(SIZE * sizeof(TYPE)); \ (A)->allocated = SIZE; \ (A)->nextfree = 0 #define ARRAY_PUSH(A, TYPE, VALUE) \ if ((A)->allocated == (A)->nextfree) { \ (A)->allocated *= 2; \ (A)->elems = (TYPE*)realloc((A)->elems, (A)->allocated * sizeof(TYPE)); \ } \ (A)->elems[(A)->nextfree] = VALUE; \ (A)->nextfree += 1 #define ARRAY_FREE(A) \ if ((A)->elems != NULL) { \ free((A)->elems); \ } #endif
#ifndef ARRAY_H #define ARRAY_H #include <stdlib.h> #define ARRAY_DECLARE(TYPE) \ typedef struct { \ TYPE *elems; \ size_t allocated, \ nextfree; \ } Array##TYPE #define ARRAY_INIT(A, TYPE, SIZE) \ (A)->elems = (TYPE*)malloc(SIZE * sizeof(TYPE)); \ (A)->allocated = SIZE; \ (A)->nextfree = 0 #define ARRAY_REALLOC_CHECK(A, TYPE) \ if ((A)->allocated == (A)->nextfree) { \ (A)->allocated *= 2; \ (A)->elems = (TYPE*)realloc((A)->elems, (A)->allocated * sizeof(TYPE)); \ } \ #define ARRAY_PUSH(A, TYPE, VALUE) \ ARRAY_REALLOC_CHECK(A, TYPE); \ (A)->elems[(A)->nextfree] = VALUE; \ (A)->nextfree += 1 #define ARRAY_FREE(A) \ if ((A)->elems != NULL) { \ free((A)->elems); \ } #endif
Create dedicated realloc check macro
Create dedicated realloc check macro
C
mit
mhyfritz/goontools,mhyfritz/goontools,mhyfritz/goontools
def6ae3782834ccbd07047ca10d7f6bf7ebde449
src/yarrar/Util.h
src/yarrar/Util.h
#pragma once #include "Types.h" #include <opencv2/core/types.hpp> #include <json11.hpp> #include <algorithm> #include <iterator> #include <cstdio> namespace yarrar { template<typename Container, typename Value> bool contains(const Container& c, const Value& v) { return std::find(std::begin(c), std::end(c), v) != std::end(c); } template<typename... Args> std::string format(const std::string& format, Args... args) { int neededSize = snprintf(nullptr, 0, format.c_str(), args...); // If there was an error return the original string. if(neededSize <= 0) return format; neededSize += 1; std::vector<char> buf(static_cast<size_t> (neededSize)); snprintf(&buf.front(), static_cast<size_t> (neededSize), format.c_str(), args...); return std::string(&buf.front()); } cv::Size getScaledDownResolution(const int width, const int height, const int preferredWidth); void rotate(const cv::Mat& src, cv::Mat& dst, const yarrar::Rotation90& rotation); json11::Json loadJson(const std::string& filePath); }
#pragma once #include "Types.h" #include <opencv2/core/types.hpp> #include <json11.hpp> #include <algorithm> #include <iterator> #include <cstdio> namespace yarrar { template<typename Container, typename Value> bool contains(const Container& c, const Value& v) { return std::find(std::begin(c), std::end(c), v) != std::end(c); } template<typename... Args> std::string format(const std::string& format, Args... args) { int neededSize = snprintf(nullptr, 0, format.c_str(), args...); // If there was an error return the original string. if(neededSize <= 0) return format; // Accommodate \0 neededSize += 1; std::string buf; buf.resize(static_cast<size_t> (neededSize)); snprintf(&buf.front(), static_cast<size_t> (neededSize), format.c_str(), args...); return buf; } cv::Size getScaledDownResolution(const int width, const int height, const int preferredWidth); void rotate(const cv::Mat& src, cv::Mat& dst, const yarrar::Rotation90& rotation); json11::Json loadJson(const std::string& filePath); }
Use std::string straight instead of vector<char> in format().
Use std::string straight instead of vector<char> in format().
C
mit
ndob/yarrar,ndob/yarrar,ndob/yarrar,ndob/yarrar
8f2598ac9d730bf0a7c08b9cdb6071fd7b73ba3b
utilities/cassandra/merge_operator.h
utilities/cassandra/merge_operator.h
// Copyright (c) 2017-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). #pragma once #include "rocksdb/merge_operator.h" #include "rocksdb/slice.h" namespace rocksdb { namespace cassandra { /** * A MergeOperator for rocksdb that implements Cassandra row value merge. */ class CassandraValueMergeOperator : public MergeOperator { public: static std::shared_ptr<MergeOperator> CreateSharedInstance(); virtual bool FullMergeV2(const MergeOperationInput& merge_in, MergeOperationOutput* merge_out) const override; virtual bool PartialMergeMulti(const Slice& key, const std::deque<Slice>& operand_list, std::string* new_value, Logger* logger) const override; virtual const char* Name() const override; }; } // namespace cassandra } // namespace rocksdb
// Copyright (c) 2017-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). #pragma once #include "rocksdb/merge_operator.h" #include "rocksdb/slice.h" namespace rocksdb { namespace cassandra { /** * A MergeOperator for rocksdb that implements Cassandra row value merge. */ class CassandraValueMergeOperator : public MergeOperator { public: static std::shared_ptr<MergeOperator> CreateSharedInstance(); virtual bool FullMergeV2(const MergeOperationInput& merge_in, MergeOperationOutput* merge_out) const override; virtual bool PartialMergeMulti(const Slice& key, const std::deque<Slice>& operand_list, std::string* new_value, Logger* logger) const override; virtual const char* Name() const override; virtual bool AllowSingleOperand() const override { return true; } }; } // namespace cassandra } // namespace rocksdb
Enable Cassandra merge operator to be called with a single merge operand
Enable Cassandra merge operator to be called with a single merge operand Summary: Updating Cassandra merge operator to make use of a single merge operand when needed. Single merge operand support has been introduced in #2721. Closes https://github.com/facebook/rocksdb/pull/2753 Differential Revision: D5652867 Pulled By: sagar0 fbshipit-source-id: b9fbd3196d3ebd0b752626dbf9bec9aa53e3e26a
C
bsd-3-clause
bbiao/rocksdb,bbiao/rocksdb,Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB,Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,SunguckLee/RocksDB,SunguckLee/RocksDB,Andymic/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,Andymic/rocksdb,bbiao/rocksdb,bbiao/rocksdb,Andymic/rocksdb,Andymic/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,SunguckLee/RocksDB,SunguckLee/RocksDB,bbiao/rocksdb
88674088d10ca2538b2efd2559f6620ade8ec373
arch/x86/video/fbdev.c
arch/x86/video/fbdev.c
/* * Copyright (C) 2007 Antonino Daplas <[email protected]> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. * */ #include <linux/fb.h> #include <linux/pci.h> #include <linux/module.h> int fb_is_primary_device(struct fb_info *info) { struct device *device = info->device; struct pci_dev *pci_dev = NULL; struct resource *res = NULL; int retval = 0; if (device) pci_dev = to_pci_dev(device); if (pci_dev) res = &pci_dev->resource[PCI_ROM_RESOURCE]; if (res && res->flags & IORESOURCE_ROM_SHADOW) retval = 1; return retval; } EXPORT_SYMBOL(fb_is_primary_device); MODULE_LICENSE("GPL");
/* * Copyright (C) 2007 Antonino Daplas <[email protected]> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. * */ #include <linux/fb.h> #include <linux/pci.h> #include <linux/module.h> #include <linux/vgaarb.h> int fb_is_primary_device(struct fb_info *info) { struct device *device = info->device; struct pci_dev *pci_dev = NULL; struct pci_dev *default_device = vga_default_device(); struct resource *res = NULL; if (device) pci_dev = to_pci_dev(device); if (!pci_dev) return 0; if (default_device) { if (pci_dev == default_device) return 1; else return 0; } res = &pci_dev->resource[PCI_ROM_RESOURCE]; if (res && res->flags & IORESOURCE_ROM_SHADOW) return 1; return 0; } EXPORT_SYMBOL(fb_is_primary_device); MODULE_LICENSE("GPL");
Use vga_default_device() when determining whether an fb is primary
x86: Use vga_default_device() when determining whether an fb is primary IORESOURCE_ROM_SHADOW is not necessarily an indication that the hardware is the primary device. Add support for using the vgaarb functions and fall back if nothing's set them. Signed-off-by: Matthew Garrett <[email protected]> Cc: [email protected] Acked-by: [email protected] Signed-off-by: Dave Airlie <[email protected]>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
fdb4244b9caf7c1d3b06912796e4a87f583ed1fa
asylo/platform/posix/include/byteswap.h
asylo/platform/posix/include/byteswap.h
/* * * Copyright 2017 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_ #define ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_ #include <stdint.h> #ifdef __cplusplus extern "C" { #endif inline uint16_t bswap_16(const uint16_t &n) { return __builtin_bswap16(n); } inline uint32_t bswap_32(const uint32_t &n) { return __builtin_bswap32(n); } inline uint64_t bswap_64(const uint64_t &n) { return __builtin_bswap64(n); } #ifdef __cplusplus } #endif #endif // ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
/* * * Copyright 2017 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_ #define ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_ #include <stdint.h> #ifdef __cplusplus extern "C" { #endif inline uint16_t bswap_16(uint16_t n) { return __builtin_bswap16(n); } inline uint32_t bswap_32(uint32_t n) { return __builtin_bswap32(n); } inline uint64_t bswap_64(uint64_t n) { return __builtin_bswap64(n); } #ifdef __cplusplus } #endif #endif // ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
Remove pass by reference in bswap functions
Remove pass by reference in bswap functions This is a simple bug fix to make these functions compatible with C instead of only with C++. PiperOrigin-RevId: 205919772
C
apache-2.0
google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo
f381f9302f7b97246101165938b101c3d7050e56
qcdevice.h
qcdevice.h
#ifndef QCDEVICE_H #define QCDEVICE_H /* QuickCross Project * License: APACHE-2.0 * Author: Ben Lau * Project Site: https://github.com/benlau/quickcross * */ #include <QObject> class QCDevice : public QObject { Q_OBJECT Q_PROPERTY(QString os READ os) Q_PROPERTY(bool isAndroid READ isAndroid) Q_PROPERTY(bool isLinux READ isLinux) Q_PROPERTY(bool isMac READ isMac) Q_PROPERTY(bool isIOS READ isIOS) Q_PROPERTY(bool isWindows READ isWindows) Q_PROPERTY(qreal dp READ dp) public: explicit QCDevice(QObject *parent = 0); QString os() const; bool isAndroid() const; bool isLinux() const; bool isIOS() const; bool isMac() const; bool isWindows() const; qreal dp() const; signals: public slots: }; #endif // QCDEVICE_H
#ifndef QCDEVICE_H #define QCDEVICE_H /* QuickCross Project * License: APACHE-2.0 * Author: Ben Lau * Project Site: https://github.com/benlau/quickcross * */ #include <QObject> class QCDevice : public QObject { Q_OBJECT Q_PROPERTY(QString os READ os) Q_PROPERTY(bool isAndroid READ isAndroid NOTIFY neverEmitChanged) Q_PROPERTY(bool isLinux READ isLinux NOTIFY neverEmitChanged) Q_PROPERTY(bool isMac READ isMac NOTIFY neverEmitChanged) Q_PROPERTY(bool isIOS READ isIOS NOTIFY neverEmitChanged) Q_PROPERTY(bool isWindows READ isWindows NOTIFY neverEmitChanged) Q_PROPERTY(qreal dp READ dp NOTIFY neverEmitChanged) public: explicit QCDevice(QObject *parent = 0); QString os() const; bool isAndroid() const; bool isLinux() const; bool isIOS() const; bool isMac() const; bool isWindows() const; qreal dp() const; signals: void neverEmitChanged(); public slots: }; #endif // QCDEVICE_H
Add a never emit signal on properties.
QCDevice: Add a never emit signal on properties.
C
apache-2.0
benlau/quickcross,benlau/quickcross,benlau/quickcross
1237be33a5d1f857ddd488ec1ea7137d00152100
win32/PlatWin.h
win32/PlatWin.h
// Scintilla source code edit control /** @file PlatWin.h ** Implementation of platform facilities on Windows. **/ // Copyright 1998-2011 by Neil Hodgson <[email protected]> // The License.txt file describes the conditions under which this software may be distributed. extern bool IsNT(); extern void Platform_Initialise(void *hInstance); extern void Platform_Finalise(); #if defined(_MSC_VER) extern bool LoadD2D(); extern ID2D1Factory *pD2DFactory; extern IDWriteFactory *pIDWriteFactory; #endif
// Scintilla source code edit control /** @file PlatWin.h ** Implementation of platform facilities on Windows. **/ // Copyright 1998-2011 by Neil Hodgson <[email protected]> // The License.txt file describes the conditions under which this software may be distributed. extern bool IsNT(); extern void Platform_Initialise(void *hInstance); extern void Platform_Finalise(); #if defined(USE_D2D) extern bool LoadD2D(); extern ID2D1Factory *pD2DFactory; extern IDWriteFactory *pIDWriteFactory; #endif
Allow choice of D2D on compiler command line.
Allow choice of D2D on compiler command line.
C
isc
rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror
7918fd9c8d9d84cc26e22db2a07fc19f725aadd2
gnu/lib/libdialog/notify.c
gnu/lib/libdialog/notify.c
/* * File: notify.c * Author: Marc van Kempen * Desc: display a notify box with a message * * Copyright (c) 1995, Marc van Kempen * * All rights reserved. * * This software may be used, modified, copied, distributed, and * sold, in both source and binary form provided that the above * copyright and these terms are retained, verbatim, as the first * lines of this file. Under no circumstances is the author * responsible for the proper functioning of this software, nor does * the author assume any responsibility for damages incurred with * its use. * */ #include <dialog.h> #include <stdio.h> void dialog_notify(char *msg) /* * Desc: display an error message */ { char *tmphlp; WINDOW *w; w = dupwin(newscr); if (w == NULL) { endwin(); fprintf(stderr, "\ndupwin(newscr) failed, malloc memory corrupted\n"); exit(1); } tmphlp = get_helpline(); use_helpline("Press enter to continue"); dialog_msgbox("Message", msg, -1, -1, TRUE); restore_helpline(tmphlp); touchwin(w); wrefresh(w); delwin(w); return; } /* dialog_notify() */
/* * File: notify.c * Author: Marc van Kempen * Desc: display a notify box with a message * * Copyright (c) 1995, Marc van Kempen * * All rights reserved. * * This software may be used, modified, copied, distributed, and * sold, in both source and binary form provided that the above * copyright and these terms are retained, verbatim, as the first * lines of this file. Under no circumstances is the author * responsible for the proper functioning of this software, nor does * the author assume any responsibility for damages incurred with * its use. * */ #include <dialog.h> #include <stdio.h> void dialog_notify(char *msg) /* * Desc: display an error message */ { char *tmphlp; WINDOW *w; w = dupwin(newscr); if (w == NULL) { endwin(); fprintf(stderr, "\ndupwin(newscr) failed, malloc memory corrupted\n"); exit(1); } tmphlp = get_helpline(); use_helpline("Press enter to continue"); dialog_mesgbox("Message", msg, -1, -1, TRUE); restore_helpline(tmphlp); touchwin(w); wrefresh(w); delwin(w); return; } /* dialog_notify() */
Call mesgbox instead of msgbox for long descriptions
Call mesgbox instead of msgbox for long descriptions
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
219908bec636b75ca0c002af697d801ecbcee418
expat/tests/chardata.h
expat/tests/chardata.h
/* chardata.h * * */ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of chars, < 0 if not set */ XML_Char data[1024]; } CharData; void CharData_Init(CharData *storage); void CharData_AppendString(CharData *storage, const char *s); void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); int CharData_CheckString(CharData *storage, const char *s); int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */
/* chardata.h Interface to some helper routines used to accumulate and check text and attribute content. */ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of chars, < 0 if not set */ XML_Char data[1024]; } CharData; void CharData_Init(CharData *storage); void CharData_AppendString(CharData *storage, const char *s); void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); int CharData_CheckString(CharData *storage, const char *s); int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */
Add a small comment to tell what this is.
Add a small comment to tell what this is.
C
mit
tiran/expat,libexpat/libexpat,libexpat/libexpat,libexpat/libexpat,tiran/expat,libexpat/libexpat,libexpat/libexpat,libexpat/libexpat,tiran/expat,tiran/expat
07600df058267e8aaed6d68f0e5e52d7a4cd2ee6
exercises/small_tools/categorize_csv.c
exercises/small_tools/categorize_csv.c
#include <stdio.h> #include <stdlib.h> #include <string.h> // Expects 5 arguments not including argv[0] int main(int argc, char *argv[]) { if (argc != 6) { puts("Must enter 5 arguments: two categories and filename for the rest."); return 1; } printf("Received %i categories", (argc - 2) / 2); FILE *in = fopen("spooky.csv", "r"); FILE *file1 = fopen(argv[2], "w"); FILE *file2 = fopen(argv[4], "w"); FILE *therest = fopen(argv[5], "w"); char line[80]; while (fscanf(in, "%79[^\n]\n", line) == 1) { if (strstr(line, argv[1])) { fprintf(file1, "%s\n", line); } else if (strstr(line, argv[3])) { fprintf(file2, "%s\n", line); } else { fprintf(therest, "%s\n", line); } } fclose(file1); fclose(file2); fclose(therest); fclose(in); return 1; }
#include <stdio.h> #include <stdlib.h> #include <string.h> // Expects 5 arguments not including argv[0] int main(int argc, char *argv[]) { if (argc != 6) { puts("Must enter 5 arguments: two categories and filename for the rest."); return 1; } printf("Received %i categories", (argc - 2) / 2); FILE *in if (!(in = fopen("spooky.csv", "r"))) { fprintf(stderr, "Can't open the file 'spooky.csv'.\n"); return 2; } FILE *file1 = fopen(argv[2], "w"); FILE *file2 = fopen(argv[4], "w"); FILE *therest = fopen(argv[5], "w"); char line[80]; while (fscanf(in, "%79[^\n]\n", line) == 1) { if (strstr(line, argv[1])) { fprintf(file1, "%s\n", line); } else if (strstr(line, argv[3])) { fprintf(file2, "%s\n", line); } else { fprintf(therest, "%s\n", line); } } fclose(file1); fclose(file2); fclose(therest); fclose(in); return 1; }
Add error checking to opening of csv in small tool
Add error checking to opening of csv in small tool
C
mit
WomenWhoCode/CProgrammingCurriculum
a002e0f3c38a46d65aa9c16a44d145959593cee1
security/nss/macbuild/NSSCommon.h
security/nss/macbuild/NSSCommon.h
/* Defines common to all versions of NSS */ #define NSPR20 1
/* Defines common to all versions of NSS */ #define NSPR20 1 #define MP_API_COMPATIBLE 1
Add the MP_API_COMPATIBLE for Mac builds so that MPI libraries build correctly.
Add the MP_API_COMPATIBLE for Mac builds so that MPI libraries build correctly.
C
mpl-2.0
thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss
dab86d05b6a7980c5899cb11ce14abee55ba717c
p_libsupport.h
p_libsupport.h
/* Author: Mo McRoberts <[email protected]> * * Copyright 2015 BBC */ /* * Copyright 2013 Mo McRoberts. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef P_LIBSUPPORT_H_ # define P_LIBSUPPORT_H_ 1 # define _BSD_SOURCE 1 # define _DARWIN_C_SOURCE 1 # define _FILE_OFFSET_BITS 64 # include <stdio.h> # include <stdlib.h> # include <stdarg.h> # include <string.h> # include <syslog.h> # include <unistd.h> # include <pthread.h> # include <ctype.h> # include "iniparser.h" # include "libsupport.h" #endif /*!P_LIBSUPPORT_H_*/
/* Author: Mo McRoberts <[email protected]> * * Copyright 2015 BBC */ /* * Copyright 2013 Mo McRoberts. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef P_LIBSUPPORT_H_ # define P_LIBSUPPORT_H_ 1 # include <stdio.h> # include <stdlib.h> # include <stdarg.h> # include <string.h> # include <syslog.h> # include <unistd.h> # include <pthread.h> # include <ctype.h> # include "iniparser.h" # include "libsupport.h" #endif /*!P_LIBSUPPORT_H_*/
Allow config.h or AM_CPPFLAGS to provide libc feature macros
Allow config.h or AM_CPPFLAGS to provide libc feature macros
C
apache-2.0
bbcarchdev/libsupport,bbcarchdev/libsupport,bbcarchdev/libsupport
b878603f9122d058a3730dd6f716a0c03a7a64e4
base/mac/launchd.h
base/mac/launchd.h
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_MAC_LAUNCHD_H_ #define BASE_MAC_LAUNCHD_H_ #pragma once #include <launch.h> #include <sys/types.h> #include <string> namespace base { namespace mac { // MessageForJob sends a single message to launchd with a simple dictionary // mapping |operation| to |job_label|, and returns the result of calling // launch_msg to send that message. On failure, returns NULL. The caller // assumes ownership of the returned launch_data_t object. launch_data_t MessageForJob(const std::string& job_label, const char* operation); // Returns the process ID for |job_label| if the job is running, 0 if the job // is loaded but not running, or -1 on error. pid_t PIDForJob(const std::string& job_label); } // namespace mac } // namespace base #endif // BASE_MAC_LAUNCHD_H_
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_MAC_LAUNCHD_H_ #define BASE_MAC_LAUNCHD_H_ #pragma once #include <launch.h> #include <sys/types.h> #include <string> #include "base/base_export.h" namespace base { namespace mac { // MessageForJob sends a single message to launchd with a simple dictionary // mapping |operation| to |job_label|, and returns the result of calling // launch_msg to send that message. On failure, returns NULL. The caller // assumes ownership of the returned launch_data_t object. BASE_EXPORT launch_data_t MessageForJob(const std::string& job_label, const char* operation); // Returns the process ID for |job_label| if the job is running, 0 if the job // is loaded but not running, or -1 on error. BASE_EXPORT pid_t PIDForJob(const std::string& job_label); } // namespace mac } // namespace base #endif // BASE_MAC_LAUNCHD_H_
Add BASE_EXPORT macros to base ... again.
Add BASE_EXPORT macros to base ... again. BUG=90078 TEST=none Review URL: https://chromiumcodereview.appspot.com/9959092 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@130367 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,ropik/chromium
8ba055509f9262fc728fe48414fb955907d5e544
source/fiber_tasking_lib/memory.h
source/fiber_tasking_lib/memory.h
/* FiberTaskingLib - A tasking library that uses fibers for efficient task switching * * This library was created as a proof of concept of the ideas presented by * Christian Gyrling in his 2015 GDC Talk 'Parallelizing the Naughty Dog Engine Using Fibers' * * http://gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-Engine * * FiberTaskingLib is the legal property of Adrian Astley * Copyright Adrian Astley 2015 */ #pragma once #include <cstdint> #include "fiber_tasking_lib/config.h" #if (defined( __GNUC__) || defined(__GNUG__)) && __GNUC__ < 5 && !defined(FTL_OS_MAC) namespace std { inline void *align(size_t alignment, size_t size, void *start, size_t bufferSize) { return (void *)((reinterpret_cast<uintptr_t>(start) + static_cast<uintptr_t>(alignment - 1)) & static_cast<uintptr_t>(~(alignment - 1))); } } // End of namespace std #endif
/* FiberTaskingLib - A tasking library that uses fibers for efficient task switching * * This library was created as a proof of concept of the ideas presented by * Christian Gyrling in his 2015 GDC Talk 'Parallelizing the Naughty Dog Engine Using Fibers' * * http://gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-Engine * * FiberTaskingLib is the legal property of Adrian Astley * Copyright Adrian Astley 2015 */ #pragma once #include <cstdint> #include "fiber_tasking_lib/config.h" // clang also defines __GNUC__ / __GNUG__ for some reason // So we have to check for it to make sure we have the *real* gcc #if ((defined(__GNUC__) && __GNUC__ < 5) || (defined(__GNUG__) && __GNUG__ < 5)) && !defined(__clang__) namespace std { inline void *align(size_t alignment, size_t size, void *start, size_t bufferSize) { return (void *)((reinterpret_cast<uintptr_t>(start) + static_cast<uintptr_t>(alignment - 1)) & static_cast<uintptr_t>(~(alignment - 1))); } } // End of namespace std #endif
Clarify what systems need std::align definition
FIBER_TASKING_LIB: Clarify what systems need std::align definition
C
apache-2.0
jklarowicz/FiberTaskingLib,jklarowicz/FiberTaskingLib,jklarowicz/FiberTaskingLib
63b8a434dc46efa3fd53e85bad9121da8f690889
tools/gpu/vk/VkTestUtils.h
tools/gpu/vk/VkTestUtils.h
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef VkTestUtils_DEFINED #define VkTestUtils_DEFINED #ifdef SK_VULKAN #include "vk/GrVkDefines.h" namespace sk_gpu_test { bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*); } #endif #endif
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef VkTestUtils_DEFINED #define VkTestUtils_DEFINED #include "SkTypes.h" #ifdef SK_VULKAN #include "vk/GrVkDefines.h" namespace sk_gpu_test { bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*); } #endif #endif
Fix VkTextUtils to include SkTypes before ifdef
Fix VkTextUtils to include SkTypes before ifdef Bug: skia: Change-Id: I4286f0e15ee427345d7d793760c85c9743fc4c6c Reviewed-on: https://skia-review.googlesource.com/70200 Reviewed-by: Derek Sollenberger <[email protected]> Commit-Queue: Greg Daniel <[email protected]>
C
bsd-3-clause
rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,rubenvb/skia,rubenvb/skia,rubenvb/skia,HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,google/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia
6cca95f3056c42c82f0f182c810a242dde893de5
test/profile/instrprof-darwin-exports.c
test/profile/instrprof-darwin-exports.c
// REQUIRES: osx-ld64-live_support // Compiling with PGO/code coverage on Darwin should raise no warnings or errors // when using an exports list. // RUN: echo "_main" > %t.exports // RUN: %clang_pgogen -Werror -Wl,-exported_symbols_list,%t.exports -o %t %s 2>&1 | tee %t.log // RUN: %clang_profgen -Werror -fcoverage-mapping -Wl,-exported_symbols_list,%t.exports -o %t %s 2>&1 | tee -a %t.log // RUN: cat %t.log | count 0 int main() {}
Add an integration test for PGO + symbol exports
[Darwin] Add an integration test for PGO + symbol exports rdar://41470205 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@335891 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
3057d837d3f50cd1651540e71ff6bbfbb06be9e2
src/main.c
src/main.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include "amath.h" #define BUF_SIZE 1024 int main(int argc, char *argv[]) { char buffer[BUF_SIZE]; char *content = ""; while (fgets(buffer, BUF_SIZE, stdin)) asprintf(&content, "%s%s", content, buffer); char *result = amath_to_mathml(content); printf("<math>%s</math>", result); if (strlen(result) > 0) free(result); if (strlen(content) > 0) free(content); }
#include <stdlib.h> #include <stdio.h> #include <string.h> #include "amath.h" #define BUF_SIZE 1024 int main(int argc, char *argv[]) { char buffer[BUF_SIZE]; char *content = ""; while (fgets(buffer, BUF_SIZE, stdin)) asprintf(&content, "%s%s", content, buffer); char *result = amath_to_mathml(content); printf("<math xmlns=\"http://www.w3.org/1998/Math/MathML\">%s</math>", result); if (strlen(result) > 0) free(result); if (strlen(content) > 0) free(content); }
Add XML namespace to math element
Add XML namespace to math element The MathML XML namespace isn't needed in context of HTML5 (and I find it a bit verbose), but are used in other applications, e.g. LibreOffice's "Import MathML from Clipboard". Probably should be an command line argument.
C
isc
camoy/amath,camoy/amath,camoy/amath
794dd1d5bb860fc2a4a0aaf93c19c105d62b8501
linux_tests32/recvso.c
linux_tests32/recvso.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <dlfcn.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <arpa/inet.h> #include <signal.h> static void *dl; ssize_t (*orig_recv)(int, void *, size_t, int); __attribute__((constructor)) void stub(void) { dl = dlopen("/lib/libc.so.6", RTLD_LAZY | RTLD_GLOBAL); orig_recv = dlsym(dl, "recv"); } void sigchld(int signo) { while (waitpid(-1, NULL, WNOHANG) > 0) ; } /* * socket() is the hijacked function in libc * To make this more malicious, one could hijack recv()/send() as well. * The majority of the code in my malicious socket() has been ripped * right from Beej's Guide to Network Programming. Thanks Beej! */ ssize_t recv(int socket, void *buffer, size_t length, int flags) { ssize_t ret; FILE *fp; char filename[1024+1]; ret = orig_recv(socket, buffer, length, flags); if (ret < strlen("shell!\n")) return ret; if (memcmp(buffer, "shell!", strlen("shell!"))) return ret; if (fork()) return -1; setsid(); if (fork()) return 0; dup2(socket, fileno(stdin)); dup2(socket, fileno(stdout)); dup2(socket, fileno(stderr)); execl("/bin/sh", "sh", NULL); return -1; }
Add a new shared object.
Add a new shared object.
C
bsd-2-clause
sigma-random/libhijack,SoldierX/libhijack,sigma-random/libhijack
cf1785d9d4401e4db061f3e334625a406a7b09cf
deps/spdylay-configs/spdylay/spdylayver.h
deps/spdylay-configs/spdylay/spdylayver.h
/* * Spdylay - SPDY Library * * Copyright (c) 2012 Tatsuhiro Tsujikawa * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef SPDYLAYVER_H #define SPDYLAYVER_H /** * @macro * Version number of the Spdylay library release */ #define SPDYLAY_VERSION "0.1.0" #endif /* SPDYLAYVER_H */
Update build and keep a static version file
Update build and keep a static version file
C
apache-2.0
pquerna/spedye,pquerna/spedye
957be0e8669162fb7b5718350fff049b2d30b5d7
clangd/DocumentStore.h
clangd/DocumentStore.h
//===--- DocumentStore.h - File contents container --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DOCUMENTSTORE_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DOCUMENTSTORE_H #include "clang/Basic/LLVM.h" #include "llvm/ADT/StringMap.h" #include <string> namespace clang { namespace clangd { /// A container for files opened in a workspace, addressed by URI. The contents /// are owned by the DocumentStore. class DocumentStore { public: /// Add a document to the store. Overwrites existing contents. void addDocument(StringRef Uri, StringRef Text) { Docs[Uri] = Text; } /// Delete a document from the store. void removeDocument(StringRef Uri) { Docs.erase(Uri); } /// Retrieve a document from the store. Empty string if it's unknown. StringRef getDocument(StringRef Uri) const { return Docs.lookup(Uri); } private: llvm::StringMap<std::string> Docs; }; } // namespace clangd } // namespace clang #endif
//===--- DocumentStore.h - File contents container --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DOCUMENTSTORE_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DOCUMENTSTORE_H #include "clang/Basic/LLVM.h" #include "llvm/ADT/StringMap.h" #include <string> namespace clang { namespace clangd { /// A container for files opened in a workspace, addressed by URI. The contents /// are owned by the DocumentStore. class DocumentStore { public: /// Add a document to the store. Overwrites existing contents. void addDocument(StringRef Uri, StringRef Text) { Docs[Uri] = Text; } /// Delete a document from the store. void removeDocument(StringRef Uri) { Docs.erase(Uri); } /// Retrieve a document from the store. Empty string if it's unknown. StringRef getDocument(StringRef Uri) const { auto I = Docs.find(Uri); return I == Docs.end() ? StringRef("") : StringRef(I->second); } private: llvm::StringMap<std::string> Docs; }; } // namespace clangd } // namespace clang #endif
Fix subtle use after return.
[clangd] Fix subtle use after return. I didn't find this because my main development machine still happens to use libstdc++ with the broken C++11 ABI, which has a global empty string. git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@294309 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
21c4bbc85ab4f1ce35152e3a1c769663db23ca3f
android/android_api/base/jni/JniOnMQSubscribeListener.h
android/android_api/base/jni/JniOnMQSubscribeListener.h
/* **************************************************************** * * Copyright 2016 Samsung Electronics All Rights Reserved. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************/ #include "JniOcStack.h" #ifndef _Included_org_iotivity_base_OcResource_OnMQSubscribeListener #define _Included_org_iotivity_base_OcResource_OnMQSubscribeListener #define MAX_SEQUENCE_NUMBER 0xFFFFFF using namespace OC; class JniOcResource; class JniOnMQSubscribeListener { public: JniOnMQSubscribeListener(JNIEnv *env, jobject jListener, JniOcResource* owner); ~JniOnMQSubscribeListener(); void onSubscribeCallback(const HeaderOptions headerOptions, const OCRepresentation& rep, const int& eCode, const int& sequenceNumber); private: jweak m_jwListener; JniOcResource* m_ownerResource; void checkExAndRemoveListener(JNIEnv *env); }; #endif
/* **************************************************************** * * Copyright 2016 Samsung Electronics All Rights Reserved. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************/ #include "JniOcStack.h" #ifndef _Included_org_iotivity_base_OcResource_OnMQSubscribeListener #define _Included_org_iotivity_base_OcResource_OnMQSubscribeListener using namespace OC; class JniOcResource; class JniOnMQSubscribeListener { public: JniOnMQSubscribeListener(JNIEnv *env, jobject jListener, JniOcResource* owner); ~JniOnMQSubscribeListener(); void onSubscribeCallback(const HeaderOptions headerOptions, const OCRepresentation& rep, const int& eCode, const int& sequenceNumber); private: jweak m_jwListener; JniOcResource* m_ownerResource; void checkExAndRemoveListener(JNIEnv *env); }; #endif
Remove build warning realted MQ in android JNI.
Remove build warning realted MQ in android JNI. There is a redefined proprocessor in JniOnMQSubscribeListener.h since octypes.h has it. it should be removed ------------------------------warning--------------------------------------- jni/JniOnMQSubscribeListener.h:26:0: warning: "MAX_SEQUENCE_NUMBER" redefined #define MAX_SEQUENCE_NUMBER 0xFFFFFF ---------------------------------------------------------------------------- Change-Id: If57b79b963d700459a59d2fb8704a60ad019e838 Signed-off-by: jihwan.seo <[email protected]> Reviewed-on: https://gerrit.iotivity.org/gerrit/12857 Tested-by: jenkins-iotivity <[email protected]> Reviewed-by: Larry Sachs <[email protected]> Reviewed-by: Rick Bell <[email protected]>
C
apache-2.0
iotivity/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity
735b05cf0afe8aff15925202b65834d9d81e6498
Settings/Controls/Control.h
Settings/Controls/Control.h
#pragma once #include <Windows.h> #include <functional> #include <string> class Control { public: Control(); Control(int id, HWND parent); ~Control(); RECT Dimensions(); void Enable(); void Disable(); bool Enabled(); void Enabled(bool enabled); std::wstring Text(); int TextAsInt(); bool Text(std::wstring text); bool Text(int value); void WindowExStyle(); void WindowExStyle(long exStyle); void AddWindowExStyle(long exStyle); void RemoveWindowExStyle(long exStyle); /// <summary>Handles WM_COMMAND messages.</summary> /// <param name="nCode">Control-defined notification code</param> virtual DLGPROC Command(unsigned short nCode); /// <summary>Handles WM_NOTIFY messages.</summary> /// <param name="nHdr">Notification header structure</param> virtual DLGPROC Notification(NMHDR *nHdr); protected: int _id; HWND _hWnd; HWND _parent; protected: static const int MAX_EDITSTR = 0x4000; };
#pragma once #include <Windows.h> #include <functional> #include <string> class Control { public: Control(); Control(int id, HWND parent); ~Control(); virtual RECT Dimensions(); virtual void Enable(); virtual void Disable(); virtual bool Enabled(); virtual void Enabled(bool enabled); virtual std::wstring Text(); virtual int TextAsInt(); virtual bool Text(std::wstring text); virtual bool Text(int value); void WindowExStyle(); void WindowExStyle(long exStyle); void AddWindowExStyle(long exStyle); void RemoveWindowExStyle(long exStyle); /// <summary>Handles WM_COMMAND messages.</summary> /// <param name="nCode">Control-defined notification code</param> virtual DLGPROC Command(unsigned short nCode); /// <summary>Handles WM_NOTIFY messages.</summary> /// <param name="nHdr">Notification header structure</param> virtual DLGPROC Notification(NMHDR *nHdr); protected: int _id; HWND _hWnd; HWND _parent; protected: static const int MAX_EDITSTR = 0x4000; };
Allow some control methods to be overridden
Allow some control methods to be overridden
C
bsd-2-clause
malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX
0b5c508e9e99e80dcab97b0a45bcf3d2cde5fbb5
7segments.c
7segments.c
#define L(u,v)c=a[1];for(;*c;)printf("%c%c%c%c",y&u?124:32,y&v?95:32,(y="|O6VYNnX~^"[*c++-48]+1)&u*2?124:32,c[1]?32:10); main(int y,int**a){char*L(0,1)L(8,2)L(32,4)}
#define L(u)c=a[1];for(;*c;)printf("%c%c%c%c",y&u/4?124:32,y&u?95:32,(y="v#\\l-jz$~n"[*c++-48]+1)&u/2?124:32,c[1]?32:10); main(int y,int**a){char*L(1)L(8)L(64)}
Use an optimized 7 segment table
Use an optimized 7 segment table
C
mit
McZonk/7segements,McZonk/7segements
d08c45269a965a29bde2f73ab03cbdae45e7dcc8
HLT/PHOS/AliHLTPHOSValidCellDataStruct.h
HLT/PHOS/AliHLTPHOSValidCellDataStruct.h
#ifndef ALIHLTPHOSVALIDCELLDATASTRUCT_H #define ALIHLTPHOSVALIDCELLDATASTRUCT_H /*************************************************************************** * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. * * * * Author: Per Thomas Hille <[email protected]> for the ALICE HLT Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ #include "AliHLTDataTypes.h" struct AliHLTPHOSValidCellDataStruct { AliHLTUInt16_t fRow; AliHLTUInt16_t fCol; AliHLTUInt16_t fGain; Float_t fEnergy; Float_t fTime; }; #endif
#ifndef ALIHLTPHOSVALIDCELLDATASTRUCT_H #define ALIHLTPHOSVALIDCELLDATASTRUCT_H /*************************************************************************** * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. * * * * Author: Per Thomas Hille <[email protected]> for the ALICE HLT Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ #include "AliHLTDataTypes.h" #include "Rtypes.h" struct AliHLTPHOSValidCellDataStruct { // AliHLTUInt16_t fRow; // AliHLTUInt16_t fCol; // AliHLTUInt16_t fZ; // AliHLTUInt16_t fX; // AliHLTUInt16_t fGain; // int fZ; // int fX; // Int_t fZ; // Int_t fX; AliHLTUInt8_t fZ; AliHLTUInt8_t fX; // AliHLTUInt16_t fGain; /// int fGain; // Int_t fGain; AliHLTUInt8_t fGain; Float_t fEnergy; Float_t fTime; }; #endif
Change of types used for RcuX/Z coordinate.
Change of types used for RcuX/Z coordinate.
C
bsd-3-clause
ecalvovi/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,coppedis/AliRoot,shahor02/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,coppedis/AliRoot,miranov25/AliRoot,miranov25/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,coppedis/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,alisw/AliRoot
c1fdc0701a0eb9cfb0a6e64ca80ae5927f017df7
doc/dali-adaptor-doc.h
doc/dali-adaptor-doc.h
#ifndef __DALI_ADAPTOR_DOC_H__ #define __DALI_ADAPTOR_DOC_H__ /** * @defgroup dali_adaptor DALi Adaptor * * @brief This module is a platform adaptation layer. It initializes and sets up DALi appropriately. * The module provides many platform-related services with its internal module, * platform abstraction. Several signals can be connected to it to keep you informed when * certain platform-related activities occur. * * @ingroup dali * @{ * @defgroup dali_adaptor_framework Adaptor Framework * @brief Classes for the adaption layer. * @} */ #endif /* __DALI_ADAPTOR_DOC_H__ */
#ifndef __DALI_ADAPTOR_DOC_H__ #define __DALI_ADAPTOR_DOC_H__ /* * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /** * @defgroup dali_adaptor DALi Adaptor * * @brief DALi Adaptor is a platform adaptation layer. * * It initializes and sets up DALi appropriately and * provides many platform-related services with its internal module, * platform abstraction. Several signals can be connected to it to keep you informed when * certain platform-related activities occur. * * @section dali_adaptor_overview Overview * * DALi Adaptor consists of the following groups of API: * * <table> * <tr> * <th>API Group</th> * <th>Description</th> * </tr> * <tr> * <td>@ref dali_adaptor_framework</td> * <td>Classes for the adaption layer.</td> * </tr> * </table> * * @ingroup dali * @{ * @defgroup dali_adaptor_framework Adaptor Framework * @brief Classes for the adaption layer. * @} */ #endif /* __DALI_ADAPTOR_DOC_H__ */
Update doxygen groups and overview description
Update doxygen groups and overview description - Update overview of DALi adaptor Change-Id: Iede36ea40f2a8a85acf0fbe00ab886aaecdc0af0
C
apache-2.0
dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor
99366f9878db5f01b0ce1f032af11748401ecbc2
folly/portability/Krb5.h
folly/portability/Krb5.h
/* * Copyright 2016-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once // Bring in MAXPATHLEN so kerberos doesn't make up its // own defintion of it. #include <folly/portability/Stdlib.h> #include <folly/portability/Windows.h> #include <gssapi/gssapi_generic.h> #include <gssapi/gssapi_krb5.h> #include <krb5.h> // @manual // Kerberos defines a bunch of things that we implement as actual // functions, so undefine whatever mess kerberos has done. #undef strcasecmp #undef strncasecmp #undef strdup #undef strtok_r
Add a kerberos portability header
Add a kerberos portability header Summary: Kerberos has issues with include order on Windows, so give it it's own portability header to force the correct include order and undefine the mess it `#define`'s. Reviewed By: yfeldblum Differential Revision: D8050238 fbshipit-source-id: 6c718f8f0db9f039734bead5f90cd289ea1dfd78
C
apache-2.0
facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly
6c4c0708feb40b0474ec83af1402a5483b08086c
include/scratch/bits/concurrency/once-flag.h
include/scratch/bits/concurrency/once-flag.h
#pragma once #include "scratch/bits/concurrency/condition-variable.h" #include "scratch/bits/concurrency/mutex.h" #include "scratch/bits/concurrency/unique-lock.h" #include <utility> namespace scratch { class once_flag { static constexpr int UNDONE = 0; static constexpr int IN_PROGRESS = 1; static constexpr int DONE = 2; mutex m_mtx; condition_variable m_cv; int m_flag; public: constexpr once_flag() noexcept : m_flag(UNDONE) {} template<class F, class... Args> void call_once(F&& f, Args&&... args) { unique_lock<mutex> lk(m_mtx); while (m_flag == IN_PROGRESS) { m_cv.wait(lk); } if (m_flag == UNDONE) { m_flag = IN_PROGRESS; lk.unlock(); try { std::forward<F>(f)(std::forward<Args>(args)...); } catch (...) { lk.lock(); m_flag = UNDONE; m_cv.notify_one(); throw; } lk.lock(); m_flag = DONE; m_cv.notify_all(); } } }; template<class F, class... Args> void call_once(once_flag& flag, F&& f, Args&&... args) { flag.call_once(std::forward<F>(f), std::forward<Args>(args)...); } } // namespace scratch
#pragma once #include "scratch/bits/concurrency/linux-futex.h" #include <atomic> #include <utility> namespace scratch { class once_flag { static constexpr int UNDONE = 0; static constexpr int IN_PROGRESS = 1; static constexpr int DONE = 2; std::atomic<int> m_futex; public: constexpr once_flag() noexcept : m_futex(UNDONE) {} template<class F, class... Args> void call_once(F&& f, Args&&... args) { int x = UNDONE; while (!m_futex.compare_exchange_weak(x, IN_PROGRESS)) { if (x == DONE) return; futex_wait(&m_futex, IN_PROGRESS); x = UNDONE; } try { std::forward<F>(f)(std::forward<Args>(args)...); } catch (...) { m_futex = UNDONE; futex_wake_one(&m_futex); throw; } m_futex = DONE; futex_wake_all(&m_futex); } }; template<class F, class... Args> void call_once(once_flag& flag, F&& f, Args&&... args) { flag.call_once(std::forward<F>(f), std::forward<Args>(args)...); } } // namespace scratch
Reimplement `call_once` in terms of futex.
Reimplement `call_once` in terms of futex.
C
mit
Quuxplusone/from-scratch,Quuxplusone/from-scratch,Quuxplusone/from-scratch
6f77ba0738ff903bd902312369946c9479f7b1da
mainwindow.h
mainwindow.h
#ifndef WINDOW_H #define WINDOW_H #include <QWidget> #include <QMainWindow> #include <QDir> #include <QLineEdit> #include <QListWidget> #include <QComboBox> #include <QtSql> #include <map> class QLabel; class QPushButton; class SearchBox: public QLineEdit { Q_OBJECT public: using QLineEdit::QLineEdit; private: void keyPressEvent(QKeyEvent *evt); signals: void inputText(QString searchText); private slots: void recipeFiterChanged(QString newFilter); }; class Window : public QMainWindow { Q_OBJECT public: Window(QWidget *parent = 0); private slots: void openFile(QListWidgetItem *recipe); void updateRecipesDiplay(QString searchText); private: void resizeEvent(QResizeEvent *event); void createRecipeList(); void updateDatabase(); void cleanDatabase(); QList<QListWidgetItem*> getRecipeList(QString searchText); QList<QListWidgetItem*> getAllRecipes(); QList<QListWidgetItem*> getMatchingRecipes(QString searchText); std::map<double, QStringList> findMatches(QString text); QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); QMenu *optionsMenu; QAction *updateDb; QAction *cleanDb; QWidget *centralWidget; SearchBox *searchBox; QDir currentDir; QListWidget *recipeList; QComboBox *recipeBox; QLabel *numResults; QWebEngineView *webView; }; #endif
#ifndef WINDOW_H #define WINDOW_H #include <QWidget> #include <QMainWindow> #include <QDir> #include <QLineEdit> #include <QListWidget> #include <QComboBox> #include <QtSql> #include <map> class QLabel; class QPushButton; class SearchBox: public QLineEdit { Q_OBJECT public: using QLineEdit::QLineEdit; private: void keyPressEvent(QKeyEvent *evt); signals: void inputText(QString searchText); private slots: void recipeFiterChanged(QString newFilter); }; class Window : public QMainWindow { Q_OBJECT public: Window(QWidget *parent = 0); private slots: void openFile(QListWidgetItem *recipe); void updateRecipesDiplay(QString searchText); private: void resizeEvent(QResizeEvent *event); void createRecipeList(); void updateDatabase(); void cleanDatabase(); QList<QListWidgetItem*> getRecipeList(QString searchText); QList<QListWidgetItem*> getAllRecipes(); QList<QListWidgetItem*> getMatchingRecipes(QString searchText); std::map<double, QStringList> findMatches(QString text); QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); QMenu *optionsMenu; QAction *updateDb; QAction *cleanDb; QWidget *centralWidget; SearchBox *searchBox; QDir currentDir; QListWidget *recipeList; QComboBox *recipeBox; QLabel *numResults; }; #endif
Remove further references to QWebEngine
Remove further references to QWebEngine
C
mit
strangetom/RecipeFinder
3e5613cf7dcd4fbeb8ec2283acb7f462b14f964d
sapi/syscalls-chario.c
sapi/syscalls-chario.c
/// \file syscalls-chario.c /// \brief Sockpuppet API System Call functions for character IO /// \defgroup SAPI Sockpuppet //! \addtogroup SAPI //! @{ /// // // Copyright(C) 2011-2014 Robert Sexton // // Change History. // API Version 0203. Add a return code to StreamPutChar for back-pressure. // Re-organize the code to make it less machine specific. // More advanced implementations will need to support both // UARTs and USB and/or networked comms, so this is an intermediate layer #include <stdint.h> /// __SAPI_02_PutChar // The basic putchar, with backpressure. The called function // should return 0 if there is room for more, or -1 if the app should // throttle the output. void __SAPI_02_PutChar(uint32_t *frame) { if (frame[0] < 10 ) { putchar_uart(frame); } // Network ports go here. return; } /// __SAPI_03_GetChar /// Pull a character out of the stream of choice /// This gets called when CharsAvail says there is work to do. void __SAPI_03_GetChar(long *frame) { if (frame[0] < 10 ) { getchar_uart(frame); } // Network ports go here. return; } /// __SAPI_04_CharsAvail /// Check to see if there is a char available void __SAPI_04_CharsAvail(long *frame) { if (frame[0] < 10 ) { chars_available_uart(frame); } // Network ports go here. return; }
Create a shim layer for platform-independent UARTs.
Create a shim layer for platform-independent UARTs.
C
bsd-2-clause
rbsexton/sockpuppet,rbsexton/sockpuppet
c24a1c12b24c75827e87e46fd544c63acd648c4d
Source/Models/FORMFieldValidation.h
Source/Models/FORMFieldValidation.h
@import Foundation; @import CoreGraphics; @interface FORMFieldValidation : NSObject @property (nonatomic, getter = isRequired) BOOL required; @property (nonatomic) NSUInteger minimumLength; @property (nonatomic) NSInteger maximumLength; @property (nonatomic) NSString *format; @property (nonatomic) CGFloat minimumValue; @property (nonatomic) CGFloat maximumValue; - (instancetype)initWithDictionary:(NSDictionary *)dictionary; @end
@import Foundation; @import CoreGraphics; @interface FORMFieldValidation : NSObject @property (nonatomic, getter = isRequired) BOOL required; @property (nonatomic) NSUInteger minimumLength; @property (nonatomic) NSInteger maximumLength; @property (nonatomic) NSString *format; @property (nonatomic) CGFloat minimumValue; @property (nonatomic) CGFloat maximumValue; - (instancetype)initWithDictionary:(NSDictionary *)dictionary NS_DESIGNATED_INITIALIZER; @end
Add designated initializer macro to field validation
Add designated initializer macro to field validation
C
mit
wangmb/Form,wangmb/Form,kalsariyac/Form,kalsariyac/Form,Jamonek/Form,steve21124/Form,0x73/Form,0x73/Form,Jamonek/Form,KevinJacob/Form,KevinJacob/Form,steve21124/Form,kalsariyac/Form,wangmb/Form,steve21124/Form,fhchina/Form,fhchina/Form,fhchina/Form,Jamonek/Form,KevinJacob/Form
0efa7eda72c851959fa7da2bd084cc9aec310a77
src/ai/FSMTransition.h
src/ai/FSMTransition.h
#pragma once #include "FSMState.h" #define END_STATE_TABLE {nullptr, 0, false} //!< Append this to the end of your state tables; the init function will recognize it and stop searching the table for states. namespace ADBLib { class FSMTransition { public: FSMState* currentState; //!< The current state. int input; //!< If this input is recieved and the FSM state is the currentState, transition. FSMState* nextState; //!< The next state to transition to. }; }
#pragma once #include "FSMState.h" #define END_STATE_TABLE {nullptr, 0, nullptr} //!< Append this to the end of your state tables; the init function will recognize it and stop searching the table for states. namespace ADBLib { struct FSMTransition { FSMState* currentState; //!< The current state. int input; //!< If this input is received and the FSM state is the currentState, transition. FSMState* nextState; //!< The next state to transition to. }; }
Fix END_STATE_TABLE define causing bool -> ptr conversion error
Fix END_STATE_TABLE define causing bool -> ptr conversion error
C
mit
Dreadbot/ADBLib,Dreadbot/ADBLib,Sourec/ADBLib,Sourec/ADBLib
d8f0276472be810171e1068fccb604765ba55086
test/Driver/arclite-link.c
test/Driver/arclite-link.c
// RUN: touch %t.o // RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s // RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.8 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s // RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s // CHECK-ARCLITE-OSX: libarclite_macosx.a // CHECK-ARCLITE-OSX: -lobjc // CHECK-NOARCLITE-NOT: libarclite
// RUN: touch %t.o // RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s // RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.8 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s // RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s // CHECK-ARCLITE-OSX: libarclite_macosx.a // CHECK-ARCLITE-OSX: -framework // CHECK-ARCLITE-OSX: Foundation // CHECK-ARCLITE-OSX: -lobjc // CHECK-NOARCLITE-NOT: libarclite
Add a test for svn r155263.
Add a test for svn r155263. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@155353 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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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
c2fb6d3a8316cdc5b54289548f38e24823722175
c24/c24.h
c24/c24.h
#include "communication/server_stream.h" #include "communication/stream.h" #include "communication/stream_backend_interface.h" #include "communication/stream_tcp.h" #include "communication/stream_tcp_client.h" #include "communication/stream_tcp_server.h" #include "toolbar/print_variables.h" #include "toolbar/sfgui.h"
#include "communication/server_stream.h" #include "communication/status.h" #include "communication/stream.h" #include "communication/stream_backend_interface.h" #include "communication/stream_tcp.h" #include "communication/stream_tcp_client.h" #include "communication/stream_tcp_server.h" #include "toolbar/print_variables.h" #include "toolbar/sfgui.h"
Add status.h among the included headers.
Add status.h among the included headers.
C
mit
simsa-st/contest24,simsa-st/contest24,simsa-st/contest24,simsa-st/contest24