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
|
---|---|---|---|---|---|---|---|---|---|
b0ce1a387ce1c86b8b0008518a99d786006d1f32 | include/llvm/Config/dlfcn.h | include/llvm/Config/dlfcn.h | /*
* 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.
*
******************************************************************************
*
* Description:
* This header file is the autoconf replacement for dlfcn.h (if it lives
* on the system).
*/
#ifndef _CONFIG_DLFCN_H
#define _CONFIG_DLFCN_H
#include "llvm/Config/config.h"
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#endif
| /*
* 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.
*
******************************************************************************
*
* Description:
* This header file is the autoconf replacement for dlfcn.h (if it lives
* on the system).
*/
#ifndef _CONFIG_DLFCN_H
#define _CONFIG_DLFCN_H
#include "llvm/Config/config.h"
#ifdef HAVE_LTDL_H
#include <ltdl.h>
#endif
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#endif
| Include ltdl.h if we have it. | Include ltdl.h if we have it.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@17952 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap |
422ff0407a087d851e93a5ff93b1461bcdd49068 | include/socketcan/can/raw.h | include/socketcan/can/raw.h | /*
* socketcan/can/raw.h
*
* Definitions for raw CAN sockets
*
* Authors: Oliver Hartkopp <[email protected]>
* Urs Thuermann <[email protected]>
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
*
*/
#ifndef CAN_RAW_H
#define CAN_RAW_H
#include <socketcan/can.h>
#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
/* for socket options affecting the socket (not the global system) */
enum {
CAN_RAW_FILTER = 1, /* set 0 .. n can_filter(s) */
CAN_RAW_ERR_FILTER, /* set filter for error frames */
CAN_RAW_LOOPBACK, /* local loopback (default:on) */
CAN_RAW_RECV_OWN_MSGS, /* receive my own msgs (default:off) */
CAN_RAW_FD_FRAMES, /* allow CAN FD frames (default:off) */
};
#endif
| /*
* socketcan/can/raw.h
*
* Definitions for raw CAN sockets
*
* Authors: Oliver Hartkopp <[email protected]>
* Urs Thuermann <[email protected]>
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
*
*/
#ifndef CAN_RAW_H
#define CAN_RAW_H
#include <socketcan/can.h>
#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
/* for socket options affecting the socket (not the global system) */
enum {
CAN_RAW_FILTER = 1, /* set 0 .. n can_filter(s) */
CAN_RAW_ERR_FILTER, /* set filter for error frames */
CAN_RAW_LOOPBACK, /* local loopback (default:on) */
CAN_RAW_RECV_OWN_MSGS, /* receive my own msgs (default:off) */
CAN_RAW_FD_FRAMES /* allow CAN FD frames (default:off) */
};
#endif
| Fix compiler warning about redundant comma | Fix compiler warning about redundant comma
| C | mit | entropia/libsocket-can-java,entropia/libsocket-can-java,entropia/libsocket-can-java |
a2bde6cb8af902bdeef1fec4677f7fd48bab1c10 | src/apricosterm.h | src/apricosterm.h | #ifndef APRTERM_H
#define APRTERM_H
#include <SDL2/SDL.h>
#ifndef VERSION
#define VERSION "UNKNOWN"
#endif /* VERSION */
#ifndef RESOURCE_DIR
#define RESOURCE_DIR "."
#endif /* RESOURCE_DIR */
/* Font info */
#define FONT_FILE "vga8x16.png"
#define CHAR_WIDTH 8
#define CHAR_HEIGHT 16
#define FONT_COLS 32
#define FONT_LINES 8
/* Screen info */
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define SCREEN_ROWS (SCREEN_HEIGHT / CHAR_HEIGHT)
#define SCREEN_COLS (SCREEN_WIDTH / CHAR_WIDTH)
/* Terminal settings */
#define BACKGROUND_COLOR {0, 0, 0, 255}
#define FOREGROUND_COLOR EGA_GRAY
#endif /* APRTERM_H */
| #ifndef APRTERM_H
#define APRTERM_H
#include <SDL2/SDL.h>
#ifndef VERSION
#define VERSION "UNKNOWN"
#endif /* VERSION */
#ifndef RESOURCE_DIR
#define RESOURCE_DIR "."
#endif /* RESOURCE_DIR */
/* Font info */
#define FONT_FILE "vga8x16.png"
#define CHAR_WIDTH 8
#define CHAR_HEIGHT 16
#define FONT_COLS 32
#define FONT_LINES 8
/* Screen info */
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define SCREEN_ROWS (SCREEN_HEIGHT / CHAR_HEIGHT)
#define SCREEN_COLS (SCREEN_WIDTH / CHAR_WIDTH)
/* Terminal settings */
#define BACKGROUND_COLOR EGA_BLACK
#define FOREGROUND_COLOR EGA_GRAY
#endif /* APRTERM_H */
| Use EGA color constant for background | Use EGA color constant for background
| C | mit | drdanick/apricosterm |
bcaf6d41b80ac74122a9b5daa87e329348dbf094 | src/core/lib/gprpp/optional.h | src/core/lib/gprpp/optional.h | /*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GRPC_CORE_LIB_GPRPP_OPTIONAL_H
#define GRPC_CORE_LIB_GPRPP_OPTIONAL_H
namespace grpc_core {
/* A make-shift alternative for absl::Optional. This can be removed in favor of
* that once absl dependencies can be introduced. */
template <typename T>
class Optional {
public:
Optional() : value_() {}
void set(const T& val) {
value_ = val;
set_ = true;
}
bool has_value() const { return set_; }
void reset() { set_ = false; }
T value() const { return value_; }
private:
T value_;
bool set_ = false;
};
} /* namespace grpc_core */
#endif /* GRPC_CORE_LIB_GPRPP_OPTIONAL_H */
| /*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GRPC_CORE_LIB_GPRPP_OPTIONAL_H
#define GRPC_CORE_LIB_GPRPP_OPTIONAL_H
#include <grpc/support/port_platform.h>
#include <utility>
namespace grpc_core {
/* A make-shift alternative for absl::Optional. This can be removed in favor of
* that once absl dependencies can be introduced. */
template <typename T>
class Optional {
public:
Optional() : value_() {}
void set(const T& val) {
value_ = val;
set_ = true;
}
void set(T&& val) {
value_ = std::move(val);
set_ = true;
}
bool has_value() const { return set_; }
void reset() { set_ = false; }
T value() const { return value_; }
private:
T value_;
bool set_ = false;
};
} /* namespace grpc_core */
#endif /* GRPC_CORE_LIB_GPRPP_OPTIONAL_H */
| Add move assignment method to Optional<> | Add move assignment method to Optional<>
| C | apache-2.0 | jtattermusch/grpc,stanley-cheung/grpc,firebase/grpc,jboeuf/grpc,grpc/grpc,ejona86/grpc,ctiller/grpc,donnadionne/grpc,stanley-cheung/grpc,nicolasnoble/grpc,donnadionne/grpc,vjpai/grpc,jboeuf/grpc,ejona86/grpc,stanley-cheung/grpc,vjpai/grpc,firebase/grpc,ejona86/grpc,ejona86/grpc,vjpai/grpc,muxi/grpc,jtattermusch/grpc,jboeuf/grpc,jtattermusch/grpc,muxi/grpc,donnadionne/grpc,grpc/grpc,nicolasnoble/grpc,donnadionne/grpc,firebase/grpc,stanley-cheung/grpc,ctiller/grpc,jtattermusch/grpc,stanley-cheung/grpc,donnadionne/grpc,stanley-cheung/grpc,muxi/grpc,jboeuf/grpc,muxi/grpc,grpc/grpc,firebase/grpc,firebase/grpc,donnadionne/grpc,jtattermusch/grpc,ctiller/grpc,ejona86/grpc,jtattermusch/grpc,jboeuf/grpc,donnadionne/grpc,donnadionne/grpc,vjpai/grpc,ctiller/grpc,nicolasnoble/grpc,ctiller/grpc,ctiller/grpc,jtattermusch/grpc,grpc/grpc,ejona86/grpc,stanley-cheung/grpc,stanley-cheung/grpc,nicolasnoble/grpc,jtattermusch/grpc,nicolasnoble/grpc,jboeuf/grpc,muxi/grpc,jtattermusch/grpc,firebase/grpc,muxi/grpc,jtattermusch/grpc,jboeuf/grpc,firebase/grpc,nicolasnoble/grpc,nicolasnoble/grpc,ejona86/grpc,ejona86/grpc,jboeuf/grpc,ejona86/grpc,nicolasnoble/grpc,donnadionne/grpc,stanley-cheung/grpc,muxi/grpc,ctiller/grpc,ctiller/grpc,stanley-cheung/grpc,firebase/grpc,nicolasnoble/grpc,ejona86/grpc,grpc/grpc,jboeuf/grpc,ctiller/grpc,firebase/grpc,muxi/grpc,vjpai/grpc,stanley-cheung/grpc,jboeuf/grpc,jtattermusch/grpc,ctiller/grpc,nicolasnoble/grpc,firebase/grpc,donnadionne/grpc,ctiller/grpc,muxi/grpc,grpc/grpc,grpc/grpc,vjpai/grpc,firebase/grpc,grpc/grpc,vjpai/grpc,vjpai/grpc,jboeuf/grpc,muxi/grpc,nicolasnoble/grpc,jboeuf/grpc,grpc/grpc,vjpai/grpc,ejona86/grpc,nicolasnoble/grpc,muxi/grpc,firebase/grpc,vjpai/grpc,donnadionne/grpc,muxi/grpc,grpc/grpc,vjpai/grpc,ctiller/grpc,grpc/grpc,stanley-cheung/grpc,donnadionne/grpc,ejona86/grpc,grpc/grpc,jtattermusch/grpc,vjpai/grpc |
0c70c6e5ea5541a613d39c5e052ed2b3feb0ca6d | src/kernel/thread/sched_none.c | src/kernel/thread/sched_none.c | /**
* @file
*
* @date Mar 21, 2013
* @author: Anton Bondarev
*/
struct sleepq;
struct event;
void sched_wake_all(struct sleepq *sq) {
}
int sched_sleep_ms(struct sleepq *sq, unsigned long timeout) {
return 0;
}
int sched_sleep_locked_ms(struct sleepq *sq, unsigned long timeout) {
return 0;
}
int sched_sleep_ns(struct sleepq *sq, unsigned long timeout) {
return 0;
}
int sched_sleep_us(struct sleepq *sq, unsigned long timeout) {
return 0;
}
int sched_sleep_locked_us(struct sleepq *sq, unsigned long timeout) {
return 0;
}
int sched_sleep_locked_ns(struct sleepq *sq, unsigned long timeout) {
return 0;
}
| /**
* @file
*
* @date Mar 21, 2013
* @author: Anton Bondarev
*/
struct sleepq;
struct event;
void sched_wake_all(struct sleepq *sq) {
}
int sched_sleep(struct sleepq *sq, unsigned long timeout) {
return 0;
}
int sched_sleep_locked(struct sleepq *sq, unsigned long timeout) {
return 0;
}
| Fix MIPS template in master | Fix MIPS template in master | C | bsd-2-clause | embox/embox,Kefir0192/embox,vrxfile/embox-trik,abusalimov/embox,mike2390/embox,gzoom13/embox,gzoom13/embox,vrxfile/embox-trik,Kakadu/embox,Kakadu/embox,Kefir0192/embox,Kefir0192/embox,Kakadu/embox,mike2390/embox,embox/embox,mike2390/embox,vrxfile/embox-trik,Kakadu/embox,vrxfile/embox-trik,embox/embox,Kefir0192/embox,mike2390/embox,gzoom13/embox,abusalimov/embox,embox/embox,gzoom13/embox,Kakadu/embox,vrxfile/embox-trik,embox/embox,mike2390/embox,Kefir0192/embox,Kakadu/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,Kakadu/embox,mike2390/embox,abusalimov/embox,vrxfile/embox-trik,Kefir0192/embox,gzoom13/embox,gzoom13/embox,gzoom13/embox,embox/embox,abusalimov/embox,abusalimov/embox,mike2390/embox |
03529c297cdf9e273ee8541b7a0021d4fe2f621e | list.h | list.h | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
#endif | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void *);
#endif | Add List Node creation function declaration | Add List Node creation function declaration
| C | mit | MaxLikelihood/CADT |
aa8007fabbf85a51bdd7b2c084d9f77144957801 | main.c | main.c | // ** QueryString
//
// This program reads chars from stdin without echo and put to stdout.
//
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <termios.h>
int main(int argc, char * args[])
{
struct termios old_tio, new_tio;
unsigned char c;
/* get the terminal settings for stdin */
tcgetattr(STDIN_FILENO, &old_tio);
/* we want to keep the old setting to restore them a the end */
new_tio = old_tio;
/* disable canonical mode (buffered i/o) and local echo */
new_tio.c_lflag &= (~ICANON & ~ECHO);
/* set the new settings immediately */
tcsetattr(STDIN_FILENO, TCSANOW, &new_tio);
while ((c = getchar()) != '\n')
{
putchar(c);
};
/* restore the former settings */
tcsetattr(STDIN_FILENO, TCSANOW, &old_tio);
return 0;
}
| Add qstr - query string utility | Add qstr - query string utility | C | mit | showcode/tools |
|
01a10a317285f66f5343aa894388f425168c869b | clutter-cairo/cluttercairomodule.c | clutter-cairo/cluttercairomodule.c | #ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <Python.h>
#include <pygobject.h>
#include <pango/pangocairo.h>
#include <pycairo.h>
void pycluttercairo_register_classes (PyObject *d);
void pycluttercairo_add_constants (PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pycluttercairo_functions[];
extern PyTypeObject PyClutterCairoContext_Type;
Pycairo_CAPI_t *Pycairo_CAPI;
DL_EXPORT(void)
initcluttercairo (void)
{
PyObject *m, *d;
/* perform any initialisation required by the library here */
m = Py_InitModule ("cluttercairo", pycluttercairo_functions);
d = PyModule_GetDict (m);
Pycairo_IMPORT;
if (Pycairo_CAPI == NULL)
return;
#if 0
PyClutterCairoContext_Type.tp_base = &PycairoContext_Type;
if (PyType_Ready(&PyClutterCairoContext_Type) < 0) {
g_return_if_reached ();
}
#endif
init_pygobject ();
pycluttercairo_register_classes (d);
Py_INCREF (&PyClutterCairoContext_Type);
PyModule_AddObject (m, "CairoContext",
(PyObject *) &PyClutterCairoContext_Type)
;
}
| #ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <Python.h>
#include <pygobject.h>
#include <pango/pangocairo.h>
#include <pycairo.h>
void pycluttercairo_register_classes (PyObject *d);
void pycluttercairo_add_constants (PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pycluttercairo_functions[];
#if 0
extern PyTypeObject PyClutterCairoContext_Type;
#endif
Pycairo_CAPI_t *Pycairo_CAPI;
DL_EXPORT(void)
initcluttercairo (void)
{
PyObject *m, *d;
/* perform any initialisation required by the library here */
m = Py_InitModule ("cluttercairo", pycluttercairo_functions);
d = PyModule_GetDict (m);
Pycairo_IMPORT;
if (Pycairo_CAPI == NULL)
return;
#if 0
PyClutterCairoContext_Type.tp_base = &PycairoContext_Type;
if (PyType_Ready(&PyClutterCairoContext_Type) < 0) {
g_return_if_reached ();
}
#endif
init_pygobject ();
pycluttercairo_register_classes (d);
#if 0
Py_INCREF (&PyClutterCairoContext_Type);
PyModule_AddObject (m, "CairoContext",
(PyObject *) &PyClutterCairoContext_Type)
;
#endif
if (PyErr_Occurred ()) {
Py_FatalError ("unable to initialise cluttercairo module");
}
}
| Comment out the code to subclass CairoContext | Comment out the code to subclass CairoContext
We don't have any method on the cairo_t returned by ClutterCairo::create()
at the moment, so we don't need the machinery to register it as our own
subclass type. I prefer to leave it in place, so that we can use it later.
| C | lgpl-2.1 | GNOME/pyclutter,pmarti/pyclutter,pmarti/pyclutter,pmarti/pyclutter,GNOME/pyclutter,pmarti/pyclutter |
89bffceb162fa954c7d2300a8f8c3b4f513abe9e | tests/regression/46-apron2/13-ecape-more.c | tests/regression/46-apron2/13-ecape-more.c | // SKIP PARAM: --set solver td3 --set ana.activated "['base','threadid','threadflag','mallocWrapper','apron','escape']" --set ana.path_sens[+] threadflag --set ana.base.privatization none --set ana.apron.privatization mutex-meet-tid
// Copy of 45 01 for apron
#include <pthread.h>
#include <assert.h>
#include <stdio.h>
#include <unistd.h>
int g, h;
void *foo(void* p){
sleep(2);
int* ip = ((int*) p);
printf("ip is %d\n", *ip);
*ip = 42;
return NULL;
}
int main(){
int x = 0;
int *xp = &x;
pthread_t thread;
int y;
g = y;
h = y;
pthread_create(&thread, NULL, foo, xp);
sleep(4); // to make sure that we actually fail the assert when running.
assert(x == 42); //UNKNOWN!
assert(x == 0); //UNKNOWN!
assert(x <= 50);
assert(g==h);
pthread_join(thread, NULL);
return 0;
}
| Add example that should work | Add example that should work
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
987d3eec5024073a2e72b04d4f1e097e11a95f42 | dayperiod.h | dayperiod.h |
// Copyright 2015 Malcolm Inglis <http://minglis.id.au>
//
// This file is part of Libtime.
//
// Libtime is free software: you can redistribute it and/or modify it under
// the terms of the GNU Affero General Public License as published by the
// Free Software Foundation, either version 3 of the License, or (at your
// option) any later version.
//
// Libtime is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
// more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with Libtime. If not, see <https://gnu.org/licenses/>.
#ifndef LIBTIME_DAYPERIOD_H
#define LIBTIME_DAYPERIOD_H
#include <time.h>
#include <libtypes/types.h>
#include "daytime.h"
typedef struct dayperiod {
DayTime start;
ulong duration;
} DayPeriod;
DayTime
dayperiod__end( DayPeriod );
bool
dayperiod__contains( DayPeriod,
DayTime );
#endif // ifndef LIBTIME_DAYPERIOD_H
|
// Copyright 2015 Malcolm Inglis <http://minglis.id.au>
//
// This file is part of Libtime.
//
// Libtime is free software: you can redistribute it and/or modify it under
// the terms of the GNU Affero General Public License as published by the
// Free Software Foundation, either version 3 of the License, or (at your
// option) any later version.
//
// Libtime is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
// more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with Libtime. If not, see <https://gnu.org/licenses/>.
#ifndef LIBTIME_DAYPERIOD_H
#define LIBTIME_DAYPERIOD_H
#include <time.h>
#include <libtypes/types.h>
#include "daytime.h"
typedef struct dayperiod {
ulong duration;
DayTime start;
} DayPeriod;
DayTime
dayperiod__end(
DayPeriod );
bool
dayperiod__contains(
DayPeriod,
DayTime );
#endif // ifndef LIBTIME_DAYPERIOD_H
| Change ordering of fields in DayPeriod | Change ordering of fields in DayPeriod
| C | agpl-3.0 | mcinglis/libtime,mcinglis/libtime |
4be46defc30b9f98c4b9df409fdf4b39915fd6f6 | apple/RNSVGUIKit.h | apple/RNSVGUIKit.h | // Most (if not all) of this file could probably go away once react-native-macos's version of RCTUIKit.h makes its way upstream.
// https://github.com/microsoft/react-native-macos/issues/242
#if !TARGET_OS_OSX
#import <UIKit/UIKit.h>
#define RNSVGColor UIColor
#define RNSVGPlatformView UIView
#define RNSVGTextView UILabel
#define RNSVGView UIView
#else // TARGET_OS_OSX [
#import <React/RCTUIKit.h>
#define RNSVGColor NSColor
#define RNSVGPlatformView NSView
#define RNSVGTextView NSTextView
@interface RNSVGView : RCTUIView
@property CGPoint center;
@property (nonatomic, strong) RNSVGColor *tintColor;
@end
// TODO: These could probably be a part of react-native-macos
@interface NSImage (RNSVGMacOSExtensions)
@property (readonly) CGImageRef CGImage;
@end
@interface NSValue (RNSVGMacOSExtensions)
+ (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform;
+ (NSValue *)valueWithCGPoint:(CGPoint)point;
@property (readonly) CGAffineTransform CGAffineTransformValue;
@property (readonly) CGPoint CGPointValue;
@end
#endif // ] TARGET_OS_OSX
| // Most (if not all) of this file could probably go away once react-native-macos's version of RCTUIKit.h makes its way upstream.
// https://github.com/microsoft/react-native-macos/issues/242
#if !TARGET_OS_OSX
#import <UIKit/UIKit.h>
#define RNSVGColor UIColor
#define RNSVGPlatformView UIView
#define RNSVGTextView UILabel
#define RNSVGView UIView
#else // TARGET_OS_OSX [
#import <React/RCTUIKit.h>
#define RNSVGColor NSColor
#define RNSVGPlatformView NSView
#define RNSVGTextView NSTextView
@interface RNSVGView : RCTUIView
@property CGPoint center;
@property (nonatomic, strong) RNSVGColor *tintColor;
@end
// TODO: These could probably be a part of react-native-macos
// See https://github.com/microsoft/react-native-macos/issues/658 and https://github.com/microsoft/react-native-macos/issues/659
@interface NSImage (RNSVGMacOSExtensions)
@property (readonly) CGImageRef CGImage;
@end
@interface NSValue (RNSVGMacOSExtensions)
+ (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform;
+ (NSValue *)valueWithCGPoint:(CGPoint)point;
@property (readonly) CGAffineTransform CGAffineTransformValue;
@property (readonly) CGPoint CGPointValue;
@end
#endif // ] TARGET_OS_OSX
| Add links to related react-native-macos issues | Add links to related react-native-macos issues
| C | mit | react-native-community/react-native-svg,react-native-community/react-native-svg,react-native-community/react-native-svg,react-native-community/react-native-svg,react-native-community/react-native-svg |
f276f056c0d95ad78343a1f50f08e38cd3b77a3e | bluetooth/bdroid_buildcfg.h | bluetooth/bdroid_buildcfg.h | /*
* Copyright 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#define BTM_DEF_LOCAL_NAME "hammerhead"
#define BTA_DISABLE_DELAY 100 /* in milliseconds */
#endif
| /*
* Copyright 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#define BTA_DISABLE_DELAY 100 /* in milliseconds */
#endif
| Remove BTM_DEF_LOCAL_NAME define. product model name is used as default | Remove BTM_DEF_LOCAL_NAME define. product model name is used as default
bug 7441329
Change-Id: I650828b3f6a6bedd87ae9e44b057a3c3353d1250
| C | apache-2.0 | maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead |
3f75051b71f0187e6045ecd2c4e84a6e4424dc04 | kmsuriendpointstate.h | kmsuriendpointstate.h | #ifndef __KMS_URI_END_POINT_STATE_H__
#define __KMS_URI_END_POINT_STATE_H__
G_BEGIN_DECLS
typedef enum
{
KMS_URI_END_POINT_STATE_STOP,
KMS_URI_END_POINT_STATE_START,
KMS_URI_END_POINT_STATE_PLAY
} KmsUriEndPointState;
G_END_DECLS
#endif /* __KMS_URI_END_POINT_STATE__ */
| #ifndef __KMS_URI_END_POINT_STATE_H__
#define __KMS_URI_END_POINT_STATE_H__
G_BEGIN_DECLS
typedef enum
{
KMS_URI_END_POINT_STATE_STOP,
KMS_URI_END_POINT_STATE_START,
KMS_URI_END_POINT_STATE_PAUSE
} KmsUriEndPointState;
G_END_DECLS
#endif /* __KMS_URI_END_POINT_STATE__ */
| Fix state definition for UriEndPointElement | Fix state definition for UriEndPointElement
Change-Id: I72aff01136f3f13536e409040e42ad1a6dffcd4d
| C | apache-2.0 | Kurento/kms-elements,shelsonjava/kms-elements,TribeMedia/kms-elements,Kurento/kms-elements,shelsonjava/kms-elements,shelsonjava/kms-elements,TribeMedia/kms-elements,TribeMedia/kms-elements,Kurento/kms-elements |
79771029736b935605a13df181f9780bd967ecb2 | test2/typedef/init_and_func.c | test2/typedef/init_and_func.c | // RUN: %check -e %s
typedef int f(void) // CHECK: error: typedef storage on function
{
return 3;
}
typedef char c = 3; // CHECK: error: initialised typedef
main()
{
int *p = (__typeof(*p))0; // CHECK: !/warn/
for(int _Alignas(long) x = 0; x; x++); // CHECK: !/warn/
return f(); // CHECK: !/warn/
}
| // RUN: %check -e %s
typedef int f(void) // CHECK: error: typedef storage on function
{
return 3;
}
typedef char c = 3; // CHECK: error: initialised typedef
main()
{
int *p = (__typeof(*p))0; // can't check here - we think p is used uninit
for(int _Alignas(long) x = 0; x; x++); // CHECK: !/warn/
return f(); // CHECK: !/warn/
}
| Remove extra warning in typedef/init/func test | Remove extra warning in typedef/init/func test
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
06a3c0baea19e5ff295b34943fcec9609a686952 | test/shadowcallstack/init.c | test/shadowcallstack/init.c | // RUN: %clang_scs -D INCLUDE_RUNTIME %s -o %t
// RUN: %run %t
// RUN: %clang_scs %s -o %t
// RUN: not --crash %run %t
// Basic smoke test for the runtime
#include "libc_support.h"
#ifdef INCLUDE_RUNTIME
#include "minimal_runtime.h"
#else
#define scs_main main
#endif
int scs_main(void) {
scs_fputs_stdout("In main.\n");
return 0;
}
| // RUN: %clang_scs %s -o %t
// RUN: %run %t
// Basic smoke test for the runtime
#include "libc_support.h"
#include "minimal_runtime.h"
int scs_main(void) {
scs_fputs_stdout("In main.\n");
return 0;
}
| Disable negative test in shadowcallstack. | [scs] Disable negative test in shadowcallstack.
The test checks that scs does NOT work correctly w/o runtime support.
That's a strange thing to test, and it is also flaky, because things
may just work if x18 happens to point to a writable page.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@335982 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 |
25d6fa93be985030dd8febba97419e27a01141ae | src/SimpleAmqpClient/Version.h | src/SimpleAmqpClient/Version.h | #ifndef SIMPLEAMQPCLIENT_VERSION_H
#define SIMPLEAMQPCLIENT_VERSION_H
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MIT
*
* Copyright (c) 2013 Alan Antonuk
*
* 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.
* ***** END LICENSE BLOCK *****
*/
#define SIMPLEAMQPCLIENT_VERSION_MAJOR 2
#define SIMPLEAMQPCLIENT_VERSION_MINOR 5
#define SIMPLEAMQPCLIENT_VERSION_PATCH 0
#endif // SIMPLEAMQPCLIENT_VERSION_H
| #ifndef SIMPLEAMQPCLIENT_VERSION_H
#define SIMPLEAMQPCLIENT_VERSION_H
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MIT
*
* Copyright (c) 2013 Alan Antonuk
*
* 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.
* ***** END LICENSE BLOCK *****
*/
#define SIMPLEAMQPCLIENT_VERSION_MAJOR 2
#define SIMPLEAMQPCLIENT_VERSION_MINOR 6
#define SIMPLEAMQPCLIENT_VERSION_PATCH 0
#endif // SIMPLEAMQPCLIENT_VERSION_H
| Increment version to v2.6 for development | Increment version to v2.6 for development
| C | mit | alanxz/SimpleAmqpClient,alanxz/SimpleAmqpClient |
f5838918d743fc0c161c279930ac5f373061fdd7 | CommuteStream/CSCustomBanner.h | CommuteStream/CSCustomBanner.h | //
// CSCustomBanner.h
// CommuteStream
//
// Created by David Rogers on 5/3/14.
// Copyright (c) 2014 CommuteStream. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "GADCustomEventBanner.h"
#import "GADCustomEventBannerDelegate.h"
#import "GADBannerView.h"
#import "GADBannerViewDelegate.h"
#import "CSNetworkEngine.h"
@interface CSCustomBanner : NSObject <GADCustomEventBanner, GADBannerViewDelegate, UIGestureRecognizerDelegate> {
GADBannerView *bannerView_;
}
@property (nonatomic, strong) CSNetworkEngine *csNetworkEngine;
-(void)buildWebView:(NSMutableDictionary*)dict;
+ (NSString *)getIdfa;
+ (NSString *)getMacSha:(NSString *)deviceAddress;
@end | #import <Foundation/Foundation.h>
#import "GADCustomEventBanner.h"
#import "GADCustomEventBannerDelegate.h"
#import "GADBannerView.h"
#import "GADBannerViewDelegate.h"
#import "CSNetworkEngine.h"
@interface CSCustomBanner : NSObject <GADCustomEventBanner, GADBannerViewDelegate, UIGestureRecognizerDelegate> {
GADBannerView *bannerView_;
}
@property (nonatomic, strong) CSNetworkEngine *csNetworkEngine;
-(void)buildWebView:(NSMutableDictionary*)dict;
+ (NSString *)getIdfa;
+ (NSString *)getMacSha:(NSString *)deviceAddress;
@end | Remove extraneous header file comment | Remove extraneous header file comment
| C | apache-2.0 | CommuteStream/cs-ios-sdk,CommuteStream/ios-sdk,CommuteStream/ios-sdk,CommuteStream/ios-sdk,CommuteStream/cs-ios-sdk,CommuteStream/cs-ios-sdk,CommuteStream/cs-ios-sdk |
e6fb1fb433f3c4dfde024695c3b5cf593a3dd9c8 | tests/unit/test-unit-main.c | tests/unit/test-unit-main.c | #include <config.h>
#include <dlfcn.h>
#include <test-fixtures/test-unit.h>
int
main (int argc, char **argv)
{
const CoglUnitTest *unit_test;
int i;
if (argc != 2)
{
g_printerr ("usage %s UNIT_TEST\n", argv[0]);
exit (1);
}
/* Just for convenience in case people try passing the wrapper
* filenames for the UNIT_TEST argument we normalize '-' characters
* to '_' characters... */
for (i = 0; argv[1][i]; i++)
{
if (argv[1][i] == '-')
argv[1][i] = '_';
}
unit_test = dlsym (RTLD_DEFAULT, argv[1]);
if (!unit_test)
{
g_printerr ("Unknown test name \"%s\"\n", argv[1]);
return 1;
}
test_utils_init (unit_test->requirement_flags,
unit_test->known_failure_flags);
unit_test->run ();
test_utils_fini ();
return 0;
}
| #include <config.h>
#include <gmodule.h>
#include <test-fixtures/test-unit.h>
int
main (int argc, char **argv)
{
GModule *main_module;
const CoglUnitTest *unit_test;
int i;
if (argc != 2)
{
g_printerr ("usage %s UNIT_TEST\n", argv[0]);
exit (1);
}
/* Just for convenience in case people try passing the wrapper
* filenames for the UNIT_TEST argument we normalize '-' characters
* to '_' characters... */
for (i = 0; argv[1][i]; i++)
{
if (argv[1][i] == '-')
argv[1][i] = '_';
}
main_module = g_module_open (NULL, /* use main module */
0 /* flags */);
if (!g_module_symbol (main_module, argv[1], (void **) &unit_test))
{
g_printerr ("Unknown test name \"%s\"\n", argv[1]);
return 1;
}
test_utils_init (unit_test->requirement_flags,
unit_test->known_failure_flags);
unit_test->run ();
test_utils_fini ();
return 0;
}
| Use GModule instead of libdl to load unit test symbols | Use GModule instead of libdl to load unit test symbols
Previously the unit tests were using libdl without directly linking to
it. It looks like this ends up working because one of Cogl's
dependencies ends up pulling adding -ldl via libtool. However in some
configurations it looks like this wasn't happening.
To avoid this problem we can just use GModule to resolve the symbols.
g_module_open is documented to return a handle to the ‘main program’
when NULL is passed as the filename and looking at the code it seems
that this ends up using RTLD_DEFAULT so it will have the same effect.
The in-tree copy of glib already has the code for gmodule so this
shouldn't cause problems for --disable-glib.
Reviewed-by: Robert Bragg <[email protected]>
(cherry picked from commit b14ece116ed3e4b18d59b645e77b3449fac51137)
| C | lgpl-2.1 | Distrotech/cogl,Distrotech/cogl,Distrotech/cogl,Distrotech/cogl |
d3984f9f03db725dec0afe7d147d71fccb2ac83f | src/python/helpers/python_wrap_const_shared_ptr.h | src/python/helpers/python_wrap_const_shared_ptr.h | /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_PYTHON_PYTHON_WRAP_CONST_SHARED_PTR_H
#define VISTK_PYTHON_PYTHON_WRAP_CONST_SHARED_PTR_H
#include <boost/python/pointee.hpp>
#include <boost/shared_ptr.hpp>
// Retrieved from http://mail.python.org/pipermail/cplusplus-sig/2006-November/011329.html
namespace boost
{
namespace python
{
template <typename T>
inline
T*
get_pointer(boost::shared_ptr<T const> const& p)
{
return const_cast<T*>(p.get());
}
template <typename T>
struct pointee<boost::shared_ptr<T const> >
{
typedef T type;
};
}
}
#endif // VISTK_PYTHON_PYTHON_WRAP_CONST_SHARED_PTR_H
| Add support for wrapping a shared_ptr to a const | Add support for wrapping a shared_ptr to a const
| C | bsd-3-clause | mathstuf/sprokit,linus-sherrill/sprokit,linus-sherrill/sprokit,mathstuf/sprokit,Kitware/sprokit,linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,Kitware/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit |
|
311c25085bd88d500450794547ad4cead98f4737 | bcl/stm/src/main.c | bcl/stm/src/main.c | #include <bc_scheduler.h>
#include <bc_module_core.h>
#include <stm32l0xx.h>
void application_init(void);
void application_task(void *param);
int main(void)
{
bc_module_core_init();
bc_scheduler_init();
bc_scheduler_register(application_task, NULL, 0);
application_init();
bc_scheduler_run();
}
__attribute__((weak)) void application_init(void)
{
}
__attribute__((weak)) void application_task(void *param)
{
(void) param;
}
| #include <bc_scheduler.h>
#include <bc_module_core.h>
#include <stm32l0xx.h>
void application_init(void);
void application_task(void *param);
int main(void)
{
bc_module_core_init();
while (bc_tick_get() < 500)
{
continue;
}
bc_scheduler_init();
bc_scheduler_register(application_task, NULL, 0);
application_init();
bc_scheduler_run();
}
__attribute__((weak)) void application_init(void)
{
}
__attribute__((weak)) void application_task(void *param)
{
(void) param;
}
| Add 500ms wait at startup | Add 500ms wait at startup
| C | mit | bigclownlabs/bc-core-module-sdk,bigclownlabs/bc-core-module-sdk,bigclownlabs/bc-core-module-sdk |
e4faf7ca0dad2d66b21425546ec3e9eec5b9352a | cpp/util/StringTesting.h | cpp/util/StringTesting.h | #include<stdint.h>
#include<string>
#include<stdexcept>
#include<vector>
// styled according to the Google C++ Style guide
// https://google.github.io/styleguide/cppguide.html
struct TestString {
std::string s;
uint8_t key;
uint32_t score;
};
TestString CreateTestString(std::string input_string, uint8_t input_key);
std::vector<TestString> FilterNonPrintable(std::vector<TestString> input_strings);
std::vector<TestString> FilterExcessivePunctuation(std::vector<TestString> input_strings, uint16_t punc_threshold);
| #include<stdint.h>
#include<string>
#include<stdexcept>
#include<vector>
// styled according to the Google C++ Style guide
// https://google.github.io/styleguide/cppguide.html
struct TestString {
std::string s;
uint8_t key;
int32_t score;
};
TestString CreateTestString(std::string input_string, uint8_t input_key);
std::vector<TestString> FilterNonPrintable(std::vector<TestString> input_strings);
std::vector<TestString> FilterExcessivePunctuation(std::vector<TestString> input_strings, uint16_t punc_threshold);
| Change TestString score to signed int | Change TestString score to signed int
| C | mit | TheLunchtimeAttack/matasano-challenges,TheLunchtimeAttack/matasano-challenges |
e2cd05e4e0e3a41039d58f171023d66206fee3bd | tests/regression/13-privatized/59-smtprc_threadenter_path_minimal.c | tests/regression/13-privatized/59-smtprc_threadenter_path_minimal.c | #include <pthread.h>
struct options {
unsigned short number_of_threads ;
unsigned short cur_threads ;
};
struct flags {
unsigned char debug ;
};
struct options o ;
struct flags f ;
int cleaner_start(void)
{
// make unknown
int r;
o.cur_threads = r;
o.number_of_threads = r;
f.debug = r;
return 0;
}
int thread_start()
{
return 0;
}
pthread_mutex_t main_thread_count_mutex = PTHREAD_MUTEX_INITIALIZER;
int main(int argc , char **argv )
{
pthread_t c_tid ;
pthread_create(& c_tid, NULL, & cleaner_start, NULL);
int x = 0;
pthread_mutex_lock(& main_thread_count_mutex);
while ((int )o.cur_threads >= (int )o.number_of_threads) {
pthread_mutex_unlock(& main_thread_count_mutex);
if (f.debug) {
x = 1; // do something
}
// missing lock?
}
pthread_mutex_unlock(& main_thread_count_mutex);
// mine-lazy gets here with two paths and crashes
pthread_create(& c_tid, NULL, & thread_start, NULL);
return (0);
} | Add regression test where mine-lazy used to crash due to multiple paths | Add regression test where mine-lazy used to crash due to multiple paths
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
df934456592ccd64dbe9ba4a394f6a9b62effa57 | stdafx.h | 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
#include <io.h>
#include <fcntl.h>
// import ADODB
#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF", "EndOfFile")
| // 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
#include <io.h>
#include <fcntl.h>
// import ADODB
#import "C:\Program Files (x86)\Common Files\System\ado\msado15.dll" no_namespace rename("EOF", "EndOfFile")
| Correct locaiton of msado15 for x64 dev platform | Correct locaiton of msado15 for x64 dev platform
| C | bsd-2-clause | duncansmart/sqlpipe,duncansmart/sqlpipe |
b6bca94cd4fe8096cf9c22c31c1cc4a988b51c70 | src/dsmcc-ts.h | src/dsmcc-ts.h | #ifndef DSMCC_TS_H
#define DSMCC_TS_H
#include <stdint.h>
#define DSMCC_TSPARSER_BUFFER_SIZE (4096 + 188)
struct dsmcc_tsparser_buffer
{
uint16_t pid;
int si_seen;
int in_section;
int cont;
uint8_t data[DSMCC_TSPARSER_BUFFER_SIZE];
struct dsmcc_tsparser_buffer *next;
};
#endif
| #ifndef DSMCC_TS_H
#define DSMCC_TS_H
#include <stdint.h>
#define DSMCC_TSPARSER_BUFFER_SIZE 8192
struct dsmcc_tsparser_buffer
{
uint16_t pid;
int si_seen;
int in_section;
int cont;
uint8_t data[DSMCC_TSPARSER_BUFFER_SIZE];
struct dsmcc_tsparser_buffer *next;
};
#endif
| Increase size of section buffer | Increase size of section buffer
| C | lgpl-2.1 | frogbywyplay/media_libdsmcc,frogbywyplay/media_libdsmcc |
297029a7e14db8fd6f30c578e1c1860dadc04096 | frame_tools.c | frame_tools.c | #include <clib/alib_stdio_protos.h>
#include <clib/graphics_protos.h>
#include <inline/graphics_protos.h>
#include <proto/graphics.h>
#include "frame_tools.h"
void RenderFrameNumber(int frameNumber) {
struct RastPort *rastPort = GetCurrentRastPort();
SetDrMd(rastPort, JAM1);
char number[4];
sprintf(number, "%04d", frameNumber);
Move(rastPort, 2, 8);
Text(rastPort, number, 4);
}
| #include <clib/alib_stdio_protos.h>
#include <clib/graphics_protos.h>
#include <inline/graphics_protos.h>
#include <proto/graphics.h>
#include "frame_tools.h"
void RenderFrameNumber(int frameNumber) {
struct RastPort *rastPort = GetCurrentRastPort();
SetDrMd(rastPort, JAM1);
char number[5];
sprintf(number, "%04d", frameNumber);
Move(rastPort, 2, 8);
Text(rastPort, number, 4);
}
| Fix a nasty crash on Z3 Fast RAM enabled WinUAE. | Fix a nasty crash on Z3 Fast RAM enabled WinUAE.
| C | artistic-2.0 | cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene |
ef0a815082ee32b1bb661cc0b91a6eae53a7e2c3 | inc/setting.h | inc/setting.h | #ifndef __SETTING_H__
#define __SETTING_H__
#define DITHERING_AMP 768;
#define BUFFER_NUM 4
#define STAGE_NUM 4
#define SAMPLE_NUM 256
#define SAMPLE_MAX 2047
#define SAMPLING_RATE 45 /* In Kilo Hz, Make Sure it can divide 45000*/
#define SAMPLE_PERIOD (1.0f / SAMPLING_RATE)
#define Q_1 1048576
#define Q_MULT_SHIFT 11
#define BLOCK_PERIOD ((float)SAMPLE_NUM / SAMPLING_RATE)
#define DELAY_BANK(x) DELAY_BANK_##x
#define DELAY_BANK_0 0xD0200000
#define DELAY_BANK_1 0xD0300000
#define DELAY_BANK_2 0xD0400000
#define DELAY_BANK_3 0xD0500000
#define DELAY_BANK_4 0xD0600000
#endif //__SETTING_H__
| #ifndef __SETTING_H__
#define __SETTING_H__
#define DITHERING_AMP 768;
#define BUFFER_NUM 4
#define STAGE_NUM 4
#define SAMPLE_NUM 256
#define SAMPLE_MAX 2047
#define SAMPLING_RATE 44.1 /* In Kilo Hz, Make Sure it can divide 45000*/
#define SAMPLE_PERIOD (1.0f / SAMPLING_RATE)
#define Q_1 1048576
#define Q_MULT_SHIFT 11
#define BLOCK_PERIOD ((float)SAMPLE_NUM / SAMPLING_RATE)
#define DELAY_BANK(x) DELAY_BANK_##x
#define DELAY_BANK_0 0xD0200000
#define DELAY_BANK_1 0xD0300000
#define DELAY_BANK_2 0xD0400000
#define DELAY_BANK_3 0xD0500000
#define DELAY_BANK_4 0xD0600000
#endif //__SETTING_H__
| Change SAMpling Rate to 44.1K, ready for wav playing | Change SAMpling Rate to 44.1K, ready for wav playing
| C | mit | sonicyang/uRock,sonicyang/uRock,BeyondCloud/uRock,sonicyang/uRock,sonicyang/uRock,BeyondCloud/uRock,BeyondCloud/uRock,BeyondCloud/uRock |
caff0ab5a3a6557dfb052b79474c87d27674b551 | include/lightmodbus/lightmodbus.h | include/lightmodbus/lightmodbus.h | /*
liblightmodbus - a lightweight, multiplatform Modbus library
Copyright (C) 2017 Jacek Wieczorek <[email protected]>
This file is part of liblightmodbus.
Liblightmodbus is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Liblightmodbus is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIGHTMODBUS_H
#define LIGHTMODBUS_H
//This is for user convenience only
#include "core.h"
#include "master.h"
#include "slave.h"
#endif | Add general library header file for user convenience | Add general library header file for user convenience
| C | mit | Jacajack/modlib |
|
b11ab06cced551e9c13ded5aea5f753ab427b1af | lib/common/ArrayConverter.h | lib/common/ArrayConverter.h | //__________________________________________________________________________
// Author(s): Claudio Pizzolato - October 2013
// email: [email protected]
//
// DO NOT REDISTRIBUTE WITHOUT PERMISSION
//__________________________________________________________________________
//
#ifndef ArrayConverter_h
#define ArrayConverter_h
class ArrayConverter{
public:
template<typename T>
static void toStdVector(const OpenSim::Array<T>& srcArray, std::vector<T>& dstVector) {
dstVector.clear();
int size = srcArray.getSize();
dstVector.resize(size);
for(int i = 0; i < size; ++i)
dstVector.at(i) = srcArray.get(i);
}
template<typename T>
static void fromStdVector(OpenSim::Array<T>& dstArray, const std::vector<T>& srcVector) {
for(typename vector<T>::const_iterator it(srcVector.begin()); it != srcVector.end(); ++it)
dstArray.append(*it);
}
};
#endif | Add conversion from OpenSim array to vector | Add conversion from OpenSim array to vector
| C | apache-2.0 | CEINMS/CEINMS |
|
ac5bfbbc8e46369f49816d8400d10dceceaa8b5a | treeplayer/inc/LinkDef.h | treeplayer/inc/LinkDef.h | /* @(#)root/treeplayer:$Name: $:$Id: LinkDef.h,v 1.1.1.1 2000/05/16 17:00:44 rdm Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TTreePlayer;
#pragma link C++ class TPacketGenerator;
#pragma link C++ class TTreeFormula-;
#endif
| /* @(#)root/treeplayer:$Name: $:$Id: LinkDef.h,v 1.2 2000/07/06 17:20:52 brun Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TTreePlayer+;
#pragma link C++ class TPacketGenerator;
#pragma link C++ class TTreeFormula-;
#endif
| Declare option "+" for TTreePlayer | Declare option "+" for TTreePlayer
git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@986 27541ba8-7e3a-0410-8455-c3a389f83636
| C | lgpl-2.1 | bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT |
dd8141b9f910bda6a1f423dcdda0ca48fac8cdcf | src/capwap/dtls_gnutls.c | src/capwap/dtls_gnutls.c | /*
This file is part of libcapwap.
libcapwap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libcapwap is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gnutls/gnutls.h>
int dtls_gnutls_init()
{
gnutls_global_init();
return 1;
}
| /*
This file is part of libcapwap.
libcapwap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libcapwap is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gnutls/gnutls.h>
#include "cw_log.h"
int dtls_gnutls_init()
{
cw_dbg(DBG_CW_INFO,"Init SSL library - using GnuTLS");
gnutls_global_init();
return 1;
}
| Debug info for init dunction. | Debug info for init dunction.
FossilOrigin-Name: 7127f1670bedbfa09f000dcd4eff557f448184d0450b373e888856979877ccbe | C | bsd-2-clause | 7u83/actube,7u83/actube,7u83/actube,7u83/actube,7u83/actube |
43d18db47ade75c53db4fce9b521a96b01c75cec | inc/setting.h | inc/setting.h | #ifndef __SETTING_H__
#define __SETTING_H__
#define BUFFER_NUM 4
#define STAGE_NUM 4
#define SAMPLE_NUM 256
#define SAMPLE_MAX 2047
#define SAMPLING_RATE 100 /* In Kilo Hz, Make Sure it can divide 45000*/
#define SAMPLE_PREIOD 1 / SAMPLE_RATE
#define BLOCK_PREIOD SAMPLE_NUM / SAMPLING_RATE
#define DELAY_BANK(x) DELAY_BANK_##x
#define DELAY_BANK_0 0xD0200000
#define DELAY_BANK_1 0xD0300000
#define DELAY_BANK_2 0xD0400000
#define DELAY_BANK_3 0xD0500000
#define DELAY_BANK_4 0xD0600000
#endif //__SETTING_H__
| #ifndef __SETTING_H__
#define __SETTING_H__
#define BUFFER_NUM 4
#define STAGE_NUM 4
#define SAMPLE_NUM 256
#define SAMPLE_MAX 2047
#define SAMPLING_RATE 200 /* In Kilo Hz, Make Sure it can divide 45000*/
#define SAMPLE_PREIOD 1 / SAMPLE_RATE
#define BLOCK_PREIOD SAMPLE_NUM / SAMPLING_RATE
#define DELAY_BANK(x) DELAY_BANK_##x
#define DELAY_BANK_0 0xD0200000
#define DELAY_BANK_1 0xD0300000
#define DELAY_BANK_2 0xD0400000
#define DELAY_BANK_3 0xD0500000
#define DELAY_BANK_4 0xD0600000
#endif //__SETTING_H__
| Increase the sampling rate to 200khz | Increase the sampling rate to 200khz
| C | mit | sonicyang/uRock,BeyondCloud/uRock,BeyondCloud/uRock,sonicyang/uRock,sonicyang/uRock,BeyondCloud/uRock,sonicyang/uRock,BeyondCloud/uRock |
f8cbdcc43038a1acb26f6643aa06c082b14c15ef | src/Game/Player.h | src/Game/Player.h | //
// WulfGame/Game/Player.h
// Copyright (C) 2012 Lexi Robinson
// This code is freely available under the MIT licence.
//
#pragma once
#include <glm/glm.hpp>
#include "WulfConstants.h"
#include "Game/InputManager.h"
#include "Game/Constants.h"
#include "Game/Entity.h"
#include "Map/Map.h"
namespace Wulf {
class Player : public Entity {
public:
Player();
~Player() {};
void ProcessUserInput(const Input::Data& input, const double dtime);
void ProcessMapInput(const Map::Map& map);
#ifdef FREE_VIEW
glm::vec3 GetUp() const { return mUp; }
#endif
Difficulty GetDifficulty() const { return mDifficulty; }
void SetDifficulty(Difficulty nDiff) { mDifficulty = nDiff; }
private:
Difficulty mDifficulty;
#ifdef FREE_VIEW
float fhViewAngle;
float fvViewAngle;
glm::vec3 mUp;
#else
float fViewAngle;
#endif
Player(Player& other);
Player& operator=(Player& other);
};
}
| //
// WulfGame/Game/Player.h
// Copyright (C) 2012 Lexi Robinson
// This code is freely available under the MIT licence.
//
#pragma once
#include <glm/glm.hpp>
#include "WulfConstants.h"
#include "Game/InputManager.h"
#include "Game/Constants.h"
#include "Game/Entity.h"
#include "Map/Map.h"
namespace Wulf {
class Player : public Entity {
public:
Player();
~Player() {};
void ProcessUserInput(const Input::Data& input, const double dtime);
void ProcessMapInput(const Map::Map& map);
#ifdef FREE_VIEW
glm::vec3 GetUp() const { return mUp; }
#endif
byte Ammo;
word Score;
Difficulty GetDifficulty() const { return mDifficulty; }
void SetDifficulty(Difficulty nDiff) { mDifficulty = nDiff; }
private:
Difficulty mDifficulty;
#ifdef FREE_VIEW
float fhViewAngle;
float fvViewAngle;
glm::vec3 mUp;
#else
float fViewAngle;
#endif
Player(Player& other);
Player& operator=(Player& other);
};
}
| Add ammo and score fields to the player object | Add ammo and score fields to the player object
| C | mit | Lexicality/Wulf2012,Lexicality/Wulf2012 |
c4e291a94360b117fcdd4ea141599de0c670e70a | src/core/server.h | src/core/server.h | #ifndef APIMOCK_SERVER_H
#define APIMOCK_SERVER_H
#include <string>
#include <memory>
#include <functional>
#include "http/requestdata.h"
#include "http/responsedata.h"
namespace ApiMock {
class Server {
typedef std::function<ResponseData(RequestData)> CreateResponse;
struct ServerImpl;
std::unique_ptr<ServerImpl> _impl;
Server& operator=(const Server&);
Server(const Server&);
public:
Server();
~Server();
void startServer(const std::string& address, int port, int bufferSize, CreateResponse createResponse);
};
}
#endif | #ifndef APIMOCK_SERVER_H
#define APIMOCK_SERVER_H
#include <string>
#include <memory>
#include <functional>
#include "http/requestdata.h"
#include "http/responsedata.h"
namespace ApiMock {
class Server {
struct ServerImpl;
std::unique_ptr<ServerImpl> _impl;
Server& operator=(const Server&);
Server(const Server&);
public:
typedef std::function<ResponseData(RequestData)> CreateResponse;
Server();
~Server();
void startServer(const std::string& address, int port, int bufferSize, CreateResponse createResponse);
};
}
#endif | Make the CreateResponse typedef public | Make the CreateResponse typedef public
| C | mit | Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock |
74163dc02b192de5b4286d5cc7bd0377a7d06a74 | CKTextField/CKTextField.h | CKTextField/CKTextField.h | //
// CKTextField.h
// CKTextField
//
// Created by Christian Klaproth on 12.09.14.
// Copyright (c) 2014 Christian Klaproth. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "CKExternalKeyboardSupportedTextField.h"
@class CKTextField;
enum CKTextFieldValidationResult {
CKTextFieldValidationUnknown,
CKTextFieldValidationPassed,
CKTextFieldValidationFailed
};
/**
* Adds optional methods that are sent to the UITextFieldDelegate.
*/
@protocol CKTextFieldValidationDelegate <NSObject>
@optional
- (void)textField:(CKTextField*)aTextField validationResult:(enum CKTextFieldValidationResult)aResult forText:(NSString*)aText;
@end
@interface CKTextField : CKExternalKeyboardSupportedTextField
//
// User Defined Runtime Attributes (--> Storyboard!)
//
// *******************************************************
// *
// *
@property (nonatomic) NSString* validationType;
@property (nonatomic) NSString* minLength;
@property (nonatomic) NSString* maxLength;
@property (nonatomic) NSString* minValue;
@property (nonatomic) NSString* maxValue;
@property (nonatomic) NSString* pattern;
// *
// *
// *******************************************************
@property (nonatomic, weak) id<CKTextFieldValidationDelegate> validationDelegate;
- (void)shake;
- (void)showAcceptButton;
- (void)hideAcceptButton;
@end
| //
// CKTextField.h
// CKTextField
//
// Created by Christian Klaproth on 12.09.14.
// Copyright (c) 2014 Christian Klaproth. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "CKExternalKeyboardSupportedTextField.h"
@class CKTextField;
enum CKTextFieldValidationResult {
CKTextFieldValidationUnknown,
CKTextFieldValidationPassed,
CKTextFieldValidationFailed
};
/**
* Adds optional methods that are sent to the UITextFieldDelegate.
*/
@protocol CKTextFieldValidationDelegate <NSObject>
@optional
- (void)textField:(CKTextField*)aTextField validationResult:(enum CKTextFieldValidationResult)aResult forText:(NSString*)aText;
@end
@interface CKTextField : CKExternalKeyboardSupportedTextField
//
// User Defined Runtime Attributes (--> Storyboard!)
//
// *******************************************************
// *
// *
@property (nonatomic) IBInspectable NSString* validationType;
@property (nonatomic) IBInspectable NSString* minLength;
@property (nonatomic) IBInspectable NSString* maxLength;
@property (nonatomic) IBInspectable NSString* minValue;
@property (nonatomic) IBInspectable NSString* maxValue;
@property (nonatomic) IBInspectable NSString* pattern;
// *
// *
// *******************************************************
@property (nonatomic, weak) id<CKTextFieldValidationDelegate> validationDelegate;
- (void)shake;
- (void)showAcceptButton;
- (void)hideAcceptButton;
@end
| Use of IBInspectable for user defined attributes. | Use of IBInspectable for user defined attributes.
Validation type and ranges can be specified using the attribute
inspector. #5
| C | mit | JaNd3r/CKTextField,JaNd3r/CKTextField |
1c38627f3851dbae42f216f3e74de7ccf7f09e7a | chap1/onnewline.c | chap1/onnewline.c | #include <stdio.h>
#define IN 1 /* inside a word */
#define OUT 0 /* outside a word */
/* print words on a new line */
int main()
{
int state = OUT;
int c = 0;
int nl = 0;
int nw = 0;
int nc = 0;
while ((c = getchar()) != EOF) {
++nc;
if (c == '\n') {
++nl;
}
if (c == '\n' || c == '\t' || c == ' ') {
if (state == IN) {
putchar('\n');
}
state = OUT;
} else if (state == OUT) {
state = IN;
++nw;
putchar(c);
} else {
putchar(c);
}
}
printf("c: %d\nw: %d\nl: %d\n", nc, nw, nl);
}
| Add program to print whole words on new line | Add program to print whole words on new line
| C | mit | jabocg/theclang |
|
545aa5b0f40ba9967a60a53a0d802e1aac4bbc52 | include/ieeefp.h | include/ieeefp.h | /* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef i386
#include <machine/floatingpoint.h>
#else
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
#endif /* i386 */
#endif /* _IEEEFP_H_ */
| /* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */
| Use __i386__ instead of i386 in an ifdef. | Use __i386__ instead of i386 in an ifdef.
| 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 |
842aca0623cbfe63d732996a2245e57982bf1d19 | tests/regression/23-partitioned_arrays_last/12-advantage_for_last.c | tests/regression/23-partitioned_arrays_last/12-advantage_for_last.c | // PARAM: --sets solver td3 --enable ana.int.interval --disable ana.int.trier --disable exp.fast_global_inits --sets exp.partition-arrays.keep-expr "last" --enable exp.partition-arrays.enabled --set ana.activated "['base','expRelation','octagon']"
void main(void) {
example1();
}
void example1(void) {
int a[42];
a[40] = 2;
int i = 0;
while(i < 41) {
a[i] = 0;
i++;
}
assert(a[2] == 0);
assert(a[3] == 0);
}
| Add example where it is better to keep last expression | Array: Add example where it is better to keep last expression
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
204cd8ac785d45c5fd3a45b019a489ffc408398e | kernel/cwos.c | kernel/cwos.c | #include <uart.h>
#include <irq.h>
void cwos_boot()
{
uart_init();
uart0_send("Hello CWOS World\n");
irq_enable();
trigger_swi();
while (1) {
}
}
| #include <uart.h>
#include <irq.h>
void cwos_boot()
{
uart_init();
uart0_send("Hello CWOS World\n");
uart0_send("Press any key to see echo:\n");
irq_enable();
while (1) {
}
}
| Update CWOS boot welcome messages | Update CWOS boot welcome messages
| C | mit | waynecw/cwos,waynecw/cwos |
fb1702cc9197a0a0c2792a86a3cdaa774ec03455 | chrome/browser/chromeos/login/mock_user_manager.h | chrome/browser/chromeos/login/mock_user_manager.h | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#pragma once
#include <string>
#include <vector>
#include "chrome/browser/chromeos/login/user_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
class MockUserManager : public UserManager {
public:
MockUserManager() {}
virtual ~MockUserManager() {}
MOCK_CONST_METHOD0(GetUsers, std::vector<User>());
MOCK_METHOD0(OffTheRecordUserLoggedIn, void());
MOCK_METHOD1(UserLoggedIn, void(const std::string&));
MOCK_METHOD1(RemoveUser, void(const std::string&));
MOCK_METHOD1(IsKnownUser, bool(const std::string&));
MOCK_CONST_METHOD0(logged_in_user, const User&());
MOCK_METHOD0(current_user_is_owner, bool());
MOCK_METHOD1(set_current_user_is_owner, void(bool));
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
| // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#pragma once
#include <string>
#include <vector>
#include "chrome/browser/chromeos/login/user_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
class MockUserManager : public UserManager {
public:
MockUserManager() {}
virtual ~MockUserManager() {}
MOCK_CONST_METHOD0(GetUsers, std::vector<User>());
MOCK_METHOD0(OffTheRecordUserLoggedIn, void());
MOCK_METHOD1(UserLoggedIn, void(const std::string&));
MOCK_METHOD2(RemoveUser, void(const std::string&, RemoveUserDelegate*));
MOCK_METHOD1(IsKnownUser, bool(const std::string&));
MOCK_CONST_METHOD0(logged_in_user, const User&());
MOCK_CONST_METHOD0(current_user_is_owner, bool());
MOCK_METHOD1(set_current_user_is_owner, void(bool));
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
| Fix clang warning in tests for Chrome OS | Fix clang warning in tests for Chrome OS
BUG=none
TEST=build with clang and gcc
Review URL: http://codereview.chromium.org/7002028
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@84970 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | gavinp/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,ropik/chromium,adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium |
37f3968096b6f326b3d6f54e8d805677665602aa | src/main.h | src/main.h | /**
*
* Copyright (C) Tyler Hackett 2016
*
* CUDA Triangle Counter
*
* A quickly-written program to determine all possible combinations of
* valid triangles from a grid, allowing for certain coordinates of the
* grid to be marked as unusable.
*
* main.h
*
* */
#define GRID_WIDTH 4
#define GRID_HEIGHT 4
const uint2 h_invalidPoints[] = { { 0, 0 } };
__global__ void countTriangles(uint2 *validPoints, int *count);
bool isInvalidPoint(uint2 p);
| /**
*
* Copyright (C) Tyler Hackett 2016
*
* CUDA Triangle Counter
*
* A quickly-written program to determine all possible combinations of
* valid triangles from a grid, allowing for certain coordinates of the
* grid to be marked as unusable.
*
* main.h
*
* */
#define GRID_WIDTH 4
#define GRID_HEIGHT 4
const uint2 h_invalidPoints[] = { { 0, 0 }, { 0, 3 }, { 3, 0 }, { 3, 3 } };
__global__ void countTriangles(uint2 *validPoints, int *count);
bool isInvalidPoint(uint2 p);
| Set up parameters to coincide with Java counterpart | Set up parameters to coincide with Java counterpart
| C | mit | ByteSyze/CudaTriangleCounter |
35f852e50e1556fc79175dcaa62360c97981f038 | src/io/network/socketBase.h | src/io/network/socketBase.h | #ifndef SP2_IO_NETWORK_SOCKET_BASE_H
#define SP2_IO_NETWORK_SOCKET_BASE_H
#include <io/network/socketBase.h>
#include <SFML/System/NonCopyable.hpp>
namespace sp {
namespace io {
namespace network {
class SocketBase : sf::NonCopyable
{
public:
void setBlocking(bool blocking);
void setNoDelay(bool no_delay);
void setTimeout(int milliseconds);
protected:
bool isLastErrorNonBlocking();
int handle = -1;
bool blocking = true;
friend class Selector;
};
}//namespace network
}//namespace io
}//namespace sp
#endif//SP2_IO_NETWORK_SOCKET_BASE_H
| #ifndef SP2_IO_NETWORK_SOCKET_BASE_H
#define SP2_IO_NETWORK_SOCKET_BASE_H
#include <io/network/socketBase.h>
#include <SFML/System/NonCopyable.hpp>
namespace sp {
namespace io {
namespace network {
class SocketBase : sf::NonCopyable
{
public:
void setBlocking(bool blocking);
void setTimeout(int milliseconds);
protected:
bool isLastErrorNonBlocking();
int handle = -1;
bool blocking = true;
friend class Selector;
};
}//namespace network
}//namespace io
}//namespace sp
#endif//SP2_IO_NETWORK_SOCKET_BASE_H
| Reduce jitter on network communication by enabling NO_DELAY, but still make large packets within a update cycle. | Reduce jitter on network communication by enabling NO_DELAY, but still make large packets within a update cycle.
| C | mit | daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton |
c878414354902f7800675ee0bf31d10892400a81 | sys/kern/stack_protector.c | sys/kern/stack_protector.c | #include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/libkern.h>
#if defined(__SSP__) || defined(__SSP_ALL__)
long __stack_chk_guard[8] = {};
void __stack_chk_fail(void);
void
__stack_chk_fail(void)
{
panic("stack overflow detected; backtrace may be corrupted");
}
#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
static void
__stack_chk_init(void *dummy __unused)
{
size_t i;
long guard[__arraycount(__stack_chk_guard)];
arc4rand(guard, sizeof(guard), 0);
for (i = 0; i < __arraycount(guard); i++)
__stack_chk_guard[i] = guard[i];
}
/* SI_SUB_EVENTHANDLER is right after SI_SUB_LOCK used by arc4rand() init. */
SYSINIT(stack_chk, SI_SUB_EVENTHANDLER, SI_ORDER_ANY, __stack_chk_init, NULL);
#endif
| #include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/libkern.h>
long __stack_chk_guard[8] = {};
void __stack_chk_fail(void);
void
__stack_chk_fail(void)
{
panic("stack overflow detected; backtrace may be corrupted");
}
#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
static void
__stack_chk_init(void *dummy __unused)
{
size_t i;
long guard[__arraycount(__stack_chk_guard)];
arc4rand(guard, sizeof(guard), 0);
for (i = 0; i < __arraycount(guard); i++)
__stack_chk_guard[i] = guard[i];
}
/* SI_SUB_EVENTHANDLER is right after SI_SUB_LOCK used by arc4rand() init. */
SYSINIT(stack_chk, SI_SUB_EVENTHANDLER, SI_ORDER_ANY, __stack_chk_init, NULL);
| Fix a chicken-and-egg problem: this files implements SSP support, so we cannot compile it with -fstack-protector[-all] flags (or it will self-recurse); this is ensured in sys/conf/files. This OTOH means that checking for defines __SSP__ and __SSP_ALL__ to determine if we should be compiling the support is impossible (which it was trying, resulting in an empty object file). Fix this by always compiling the symbols in this files. It's good because it allows us to always have SSP support, and then compile with SSP selectively. | Fix a chicken-and-egg problem: this files implements SSP support,
so we cannot compile it with -fstack-protector[-all] flags (or
it will self-recurse); this is ensured in sys/conf/files. This
OTOH means that checking for defines __SSP__ and __SSP_ALL__ to
determine if we should be compiling the support is impossible
(which it was trying, resulting in an empty object file). Fix
this by always compiling the symbols in this files. It's good
because it allows us to always have SSP support, and then compile
with SSP selectively.
Repoted by: tinderbox
| 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 |
209fb5332115499f76f347fdb5a376ba1d9deea3 | test/test_chip8.c | test/test_chip8.c | #include <assert.h>
#include "../src/chip8.c"
void test_clear_screen(void) {
int i;
chip8_t * chip8 = chip8_new();
chip8->memory[0x200] = 0x00;
chip8->memory[0x201] = 0xE0;
chip8_fetch_current_opcode(chip8);
chip8_decode_current_opcode(chip8);
i = 0;
while (i < 64 * 32) {
assert(chip8->memory[i++] == 0);
}
}
int main(int argc, char ** argv) {
test_clear_screen();
}
| Add test for 0x00E0 (clear screen) | Add test for 0x00E0 (clear screen)
| C | mit | gsamokovarov/chip8.c,gsamokovarov/chip8.c |
|
71bddbf5bdb5c90bd041e8e126d75e15001a62a7 | OrbitCore/Profiling.h | OrbitCore/Profiling.h | //-----------------------------------
// Copyright Pierric Gimmig 2013-2017
//-----------------------------------
#pragma once
#include "BaseTypes.h"
#include "Platform.h"
#include "Utils.h"
//-----------------------------------------------------------------------------
typedef uint64_t TickType;
//-----------------------------------------------------------------------------
#ifdef _WIN32
inline void clock_gettime(uint32_t, struct timespec* spec) {
__int64 time;
GetSystemTimeAsFileTime((FILETIME*)&time);
spec->tv_sec = time / 10000000i64;
spec->tv_nsec = time % 10000000i64 * 100;
}
#endif
//-----------------------------------------------------------------------------
inline TickType OrbitTicks(uint32_t a_Clock = 0 /*CLOCK_REALTIME*/) {
timespec ts;
clock_gettime(a_Clock, &ts);
return 1000000000ll * ts.tv_sec + ts.tv_nsec;
}
//-----------------------------------------------------------------------------
inline double MicroSecondsFromTicks(TickType a_Start, TickType a_End) {
return double((a_End - a_Start)) * 0.001;
}
//-----------------------------------------------------------------------------
inline TickType TicksFromMicroseconds(double a_Micros) {
return (TickType)(a_Micros * 1000);
}
| //-----------------------------------
// Copyright Pierric Gimmig 2013-2017
//-----------------------------------
#pragma once
#include "BaseTypes.h"
#include "Platform.h"
#include "Utils.h"
//-----------------------------------------------------------------------------
typedef uint64_t TickType;
//-----------------------------------------------------------------------------
#ifdef _WIN32
inline void clock_gettime(uint32_t, struct timespec* spec) {
__int64 time;
GetSystemTimeAsFileTime((FILETIME*)&time);
spec->tv_sec = time / 10000000i64;
spec->tv_nsec = time % 10000000i64 * 100;
}
#endif
//-----------------------------------------------------------------------------
inline TickType OrbitTicks(uint32_t a_Clock = 1 /*CLOCK_MONOTONIC*/) {
timespec ts;
clock_gettime(a_Clock, &ts);
return 1000000000ll * ts.tv_sec + ts.tv_nsec;
}
//-----------------------------------------------------------------------------
inline double MicroSecondsFromTicks(TickType a_Start, TickType a_End) {
return double((a_End - a_Start)) * 0.001;
}
//-----------------------------------------------------------------------------
inline TickType TicksFromMicroseconds(double a_Micros) {
return (TickType)(a_Micros * 1000);
}
| Use CLOCK_MONOTONIC as default timer clock to align with kenel events. | Use CLOCK_MONOTONIC as default timer clock to align with kenel events.
| C | bsd-2-clause | pierricgimmig/orbitprofiler,pierricgimmig/orbitprofiler,pierricgimmig/orbitprofiler,pierricgimmig/orbitprofiler,google/orbit,google/orbit,google/orbit,google/orbit |
3c9e03bda57d33097b19eef1dbb06bc5b2876551 | test/Sema/format-string-percentm.c | test/Sema/format-string-percentm.c | // RUN: %clang_cc1 -fsyntax-only -verify %s -triple i686-pc-linux-gnu
int printf(char const*,...);
void percentm(void) {
printf("%m");
}
| // RUN: %clang_cc1 -fsyntax-only -verify %s -triple i686-pc-linux-gnu
// PR 4142 - support glibc extension to printf: '%m' (which prints strerror(errno)).
int printf(char const*,...);
void percentm(void) {
printf("%m");
}
| Add comment to test linking it back to the original Bugzilla PR. | Add comment to test linking it back to the original Bugzilla PR.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@94816 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,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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang |
532059d32b79e5c560142e4d1de67330361cc5f2 | examples/ffi-struct/struct.c | examples/ffi-struct/struct.c | struct Inner
{
int x;
};
struct Outer
{
struct Inner inner_embed;
struct Inner* inner_var;
};
void modify_via_outer(struct Outer* s)
{
s->inner_embed.x = 10;
s->inner_var->x = 15;
}
void modify_inner(struct Inner* s)
{
s->x = 5;
}
| typedef struct Inner
{
int x;
} Inner;
typedef struct Outer
{
struct Inner inner_embed;
struct Inner* inner_var;
} Outer;
void modify_via_outer(Outer* s)
{
s->inner_embed.x = 10;
s->inner_var->x = 15;
}
void modify_inner(Inner* s)
{
s->x = 5;
}
| Fix C file coding style | Fix C file coding style
| C | bsd-2-clause | jupvfranco/ponyc,cquinn/ponyc,Theodus/ponyc,jupvfranco/ponyc,mkfifo/ponyc,Praetonus/ponyc,Theodus/ponyc,Praetonus/ponyc,mkfifo/ponyc,ryanai3/ponyc,Perelandric/ponyc,lukecheeseman/ponyta,kulibali/ponyc,ryanai3/ponyc,jupvfranco/ponyc,malthe/ponyc,Theodus/ponyc,ponylang/ponyc,jupvfranco/ponyc,dipinhora/ponyc,mkfifo/ponyc,Praetonus/ponyc,sgebbie/ponyc,dipinhora/ponyc,sgebbie/ponyc,Perelandric/ponyc,CausalityLtd/ponyc,boemmels/ponyc,malthe/ponyc,cquinn/ponyc,Perelandric/ponyc,jemc/ponyc,boemmels/ponyc,boemmels/ponyc,boemmels/ponyc,boemmels/ponyc,lukecheeseman/ponyta,Perelandric/ponyc,jemc/ponyc,CausalityLtd/ponyc,mkfifo/ponyc,ponylang/ponyc,mkfifo/ponyc,cquinn/ponyc,dipinhora/ponyc,jemc/ponyc,kulibali/ponyc,ponylang/ponyc,Theodus/ponyc,sgebbie/ponyc,Theodus/ponyc,kulibali/ponyc,doublec/ponyc,doublec/ponyc,CausalityLtd/ponyc,doublec/ponyc,sgebbie/ponyc,Praetonus/ponyc,Perelandric/ponyc,cquinn/ponyc,malthe/ponyc,malthe/ponyc,lukecheeseman/ponyta,kulibali/ponyc,ryanai3/ponyc,sgebbie/ponyc,jupvfranco/ponyc |
f0337c2d1afb2774e6e58b2084f769d3436e5b1e | unittest/include_gunit.h | unittest/include_gunit.h | // (C) Copyright 2017, Google 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.
// Portability include to match the Google test environment.
#ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#include "gtest/gtest.h"
#endif // TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
| // (C) Copyright 2017, Google 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.
// Portability include to match the Google test environment.
#ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#include "gtest/gtest.h"
#include "errcode.h" // for ASSERT_HOST
#include "fileio.h" // for tesseract::File
const char* FLAGS_test_tmpdir = ".";
class file: public tesseract::File {
};
#define CHECK(test) ASSERT_HOST(test)
#endif // TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
| Add more portability hacks for Google test environment | Add more portability hacks for Google test environment
Signed-off-by: Stefan Weil <[email protected]>
| C | apache-2.0 | UB-Mannheim/tesseract,stweil/tesseract,jbarlow83/tesseract,jbarlow83/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,amitdo/tesseract,stweil/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,amitdo/tesseract,amitdo/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,jbarlow83/tesseract,stweil/tesseract,amitdo/tesseract,amitdo/tesseract,stweil/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,stweil/tesseract |
5b61dafd1ba7e44f39cf73344f2a0b2b8e66064c | src/imap/cmd-logout.c | src/imap/cmd-logout.c | /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_logout(struct client *client)
{
client_send_line(client, "* BYE Logging out");
if (client->mailbox != NULL) {
/* this could be done at client_disconnect() as well,
but eg. mbox rewrite takes a while so the waiting is
better to happen before "OK" message. */
mailbox_close(client->mailbox);
client->mailbox = NULL;
}
client_send_tagline(client, "OK Logout completed.");
client_disconnect(client);
return TRUE;
}
| /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_logout(struct client *client)
{
client_send_line(client, "* BYE Logging out");
o_stream_uncork(client->output);
if (client->mailbox != NULL) {
/* this could be done at client_disconnect() as well,
but eg. mbox rewrite takes a while so the waiting is
better to happen before "OK" message. */
mailbox_close(client->mailbox);
client->mailbox = NULL;
}
client_send_tagline(client, "OK Logout completed.");
client_disconnect(client);
return TRUE;
}
| Send the "* BYE Logging out" before closing mailbox. | Send the "* BYE Logging out" before closing mailbox.
| C | mit | Distrotech/dovecot,LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot |
193aa373d84ba155eb0307afa6cd4fecf710d007 | src/untrusted/irt/irt_tls.c | src/untrusted/irt/irt_tls.c | /*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <errno.h>
#include "native_client/src/untrusted/irt/irt.h"
#include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h"
static int nacl_irt_tls_init(void *thread_ptr) {
return -NACL_SYSCALL(tls_init)(thread_ptr);
}
static void *nacl_irt_tls_get(void) {
return NACL_SYSCALL(tls_get)();
}
const struct nacl_irt_tls nacl_irt_tls = {
nacl_irt_tls_init,
nacl_irt_tls_get,
};
| /*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <errno.h>
#include "native_client/src/untrusted/irt/irt.h"
#include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h"
static int nacl_irt_tls_init(void *thread_ptr) {
return -NACL_SYSCALL(tls_init)(thread_ptr);
}
const struct nacl_irt_tls nacl_irt_tls = {
nacl_irt_tls_init,
NACL_SYSCALL(tls_get),
};
| Reduce the cost of getting the thread pointer by one jump on x86-64 | TLS: Reduce the cost of getting the thread pointer by one jump on x86-64
BUG=none
TEST=run_hello_world_test_irt on x86-64
[email protected]
Review URL: https://codereview.chromium.org/226643010
git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@13045 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
| C | bsd-3-clause | sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client |
6d0cd228d5ea5ff734f3bc1754d0dfbb93e6d1b4 | src/defines.h | src/defines.h | #ifndef XORGGTEST_DEFINES
#define XORGGTEST_DEFINES
#define DEFAULT_XORG_LOGFILE "/tmp/Xorg.GTest.log"
#define DEFAULT_XORG_SERVER "Xorg"
#define DEFAULT_DISPLAY 133
#endif
| #ifndef XORGGTEST_DEFINES
#define XORGGTEST_DEFINES
#define DEFAULT_XORG_LOGFILE "/tmp/Xorg.GTest.log"
#define DEFAULT_DISPLAY 133
/* Allow user to override default Xorg server*/
#ifndef DEFAULT_XORG_SERVER
#define DEFAULT_XORG_SERVER "Xorg"
#endif
#endif
| Allow user to override default Xorg server binary | Allow user to override default Xorg server binary
This can be accomplished by compiling xorg-gtest with
-DDEFAULT_XORG_SERVER=path/to/Xorg.
Signed-off-by: Chase Douglas <[email protected]>
Reviewed-By: Christopher Halse Rogers <[email protected]>
| C | mit | freedesktop-unofficial-mirror/xorg__test__xorg-gtest,freedesktop-unofficial-mirror/xorg__test__xorg-gtest,freedesktop-unofficial-mirror/xorg__test__xorg-gtest |
1ff679378c9fe819fe813c25c657e459a87044a9 | src/parse.h | src/parse.h | // Copyright 2016 Mitchell Kember. Subject to the MIT License.
#ifndef PARSE_H
#define PARSE_H
#include "error.h"
#include "expr.h"
// ParseResult contains the result of parsing text. The 'expr' field has a
// meaningful value if and only if 'err_type' is -1.
struct ParseResult {
size_t chars_read;
struct Expression expr;
enum ParseErrorType err_type;
};
// Parses a string as an s-expression of pairs, symbols, and numbers. On
// success, returns the parse result with 'err_type' set to -1. Otherwise,
// returns the error type in the parse result.
struct ParseResult parse(const char *text);
#endif
| // Copyright 2016 Mitchell Kember. Subject to the MIT License.
#ifndef PARSE_H
#define PARSE_H
#include "error.h"
#include "expr.h"
// ParseResult contains the result of parsing text. The 'expr' field has a
// meaningful value if and only if 'err_type' is -1.
struct ParseResult {
size_t chars_read; // number of characters read
struct Expression expr; // parsed expression
int err_type; // -1 or a ParseErrorType value
};
// Parses a string as an s-expression of pairs, symbols, and numbers. On
// success, returns the parse result with 'err_type' set to -1. Otherwise,
// returns a ParseErrorType in the result.
struct ParseResult parse(const char *text);
#endif
| Use int, not ParseErrorType, to allow -1 | Use int, not ParseErrorType, to allow -1
| C | mit | mk12/eva,mk12/eva |
f43a8742653c7bbd4f05440152b05f19a9300d17 | src/globals.h | src/globals.h | #pragma once
#include <fstream>
#include <string>
#include <cerrno>
#include <clocale>
#include <vector>
#include <iostream>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cairo.h>
#include <gtkmm.h>
#include <gtkmm/application.h>
#include <gtkmm/window.h>
#include "../litehtml/include/litehtml.h"
#include <ft2build.h>
#include FT_FREETYPE_H
#include <fontconfig/fontconfig.h>
#include <cairo-ft.h>
#include <gdk/gdk.h>
#include <cairomm/context.h>
#include <curl/curl.h>
#include <Poco/URI.h>
extern std::string urljoin(const std::string &base, const std::string &relative);
| #pragma once
#include <fstream>
#include <string>
#include <cerrno>
#include <clocale>
#include <vector>
#include <iostream>
#include <stdlib.h>
#ifdef __APPLE__
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include <memory.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cairo.h>
#include <gtkmm.h>
#include <gtkmm/application.h>
#include <gtkmm/window.h>
#include "../litehtml/include/litehtml.h"
#include <ft2build.h>
#include FT_FREETYPE_H
#include <fontconfig/fontconfig.h>
#include <cairo-ft.h>
#include <gdk/gdk.h>
#include <cairomm/context.h>
#include <curl/curl.h>
#include <Poco/URI.h>
extern std::string urljoin(const std::string &base, const std::string &relative);
| Make including malloc on MacOS compatible | Make including malloc on MacOS compatible
| C | bsd-3-clause | litehtml/litebrowser-linux |
621af6e0e6a48c8a8c5b4804de1bdc91c3436f5b | third_party/stub-strtok_r.c | third_party/stub-strtok_r.c | /*
* public domain strtok_r() by Charlie Gordon
*
* from comp.lang.c 9/14/2007
*
* http://groups.google.com/group/comp.lang.c/msg/2ab1ecbb86646684
*
* (Declaration that it's public domain):
* http://groups.google.com/group/comp.lang.c/msg/7c7b39328fefab9c
*/
#include <string.h>
#ifdef __MINGW32__
# ifndef strtok_r
char* strtok_r(char *str, const char *delim, char **nextp)
{
char *ret;
if (str == NULL)
str = *nextp;
str += strspn(str, delim);
if (*str == '\0')
return NULL;
ret = str;
str += strcspn(str, delim);
if (*str)
*str++ = '\0';
*nextp = str;
return ret;
}
# endif /* !strtok_r */
#endif /* __MINGW32__ */
| /*
* public domain strtok_r() by Charlie Gordon
*
* from comp.lang.c 9/14/2007
*
* http://groups.google.com/group/comp.lang.c/msg/2ab1ecbb86646684
*
* (Declaration that it's public domain):
* http://groups.google.com/group/comp.lang.c/msg/7c7b39328fefab9c
*/
#include <string.h>
#ifdef __MINGW32__
# ifndef strtok_r
char* strtok_r(char *str, const char *delim, char **nextp)
{
char *ret;
if (str == NULL)
str = *nextp;
str += strspn(str, delim);
if (*str == '\0')
{
*nextp = str;
return NULL;
}
ret = str;
str += strcspn(str, delim);
if (*str)
*str++ = '\0';
*nextp = str;
return ret;
}
# endif /* !strtok_r */
#endif /* __MINGW32__ */
| Fix possible invalid write on Windows-specific `strtok_r` stub | Fix possible invalid write on Windows-specific `strtok_r` stub | C | agpl-3.0 | Levak/warfacebot,Levak/warfacebot,Levak/warfacebot |
e319b2ded9ca34aec90385905077a61f86586eff | EdkCompatibilityPkg/Compatibility/SmmBaseHelper/PageFaultHandler.c | EdkCompatibilityPkg/Compatibility/SmmBaseHelper/PageFaultHandler.c | /** @file
Page fault handler that does nothing.
Copyright (c) 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
/**
The dummy handler that does nothing.
The function is only used by systems that don't use paging but need
build pass.
**/
VOID
PageFaultHandlerHook (
VOID
)
{
} | /** @file
Page fault handler that does nothing.
Copyright (c) 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
/**
The dummy handler that does nothing.
The function is only used by systems that don't use paging but need
build pass.
**/
VOID
PageFaultHandlerHook (
VOID
)
{
}
| Add the blank line at the end of file to pass ICC compiler. | Add the blank line at the end of file to pass ICC compiler.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@10357 6f19259b-4bc3-4df7-8a09-765794883524
| C | bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 |
07a6d3c5a9b5006fec34bab289c421a097961be4 | kernel/device/pit.c | kernel/device/pit.c | #include <arch/x64/interrupts.h>
#include <arch/x64/pic.h>
#include <arch/x64/port.h>
#include <truth/interrupts.h>
#include <truth/log.h>
#include <truth/scheduler.h>
#define Timer_IRQ_Number 0x20
#define Timer_Magic_Number 1193180
#define Timer_Chan_0 0x40
#define Timer_Chan_1 0x41
#define Timer_Chan_2 0x42
#define Timer_Command_Reg 0x43
#define RW_Oneshot_Square 0x36
static void timer_interrupt_handler(struct interrupt_cpu_state *unused(r)) {
log(Log_Error, "tick");
scheduler_yield();
}
void timer_init(void) {
interrupt_register_handler(Timer_IRQ_Number, timer_interrupt_handler);
}
void timer_set_phase(uint8_t hertz) {
uint8_t divisor = Timer_Magic_Number / hertz;
write_port(Timer_Command_Reg, RW_Oneshot_Square);
write_port(Timer_Chan_0, divisor & 0xff);
write_port(Timer_Chan_0, divisor >> 8);
pic_enable(Timer_IRQ_Number);
}
void timer_fini(void) {
interrupt_unregister_handler(Timer_IRQ_Number, timer_interrupt_handler);
}
| #include <arch/x64/interrupts.h>
#include <arch/x64/pic.h>
#include <arch/x64/port.h>
#include <truth/interrupts.h>
#include <truth/log.h>
#include <truth/scheduler.h>
#define Timer_IRQ_Number 0x20
#define Timer_Magic_Number 1193180
#define Timer_Chan_0 0x40
#define Timer_Chan_1 0x41
#define Timer_Chan_2 0x42
#define Timer_Command_Reg 0x43
#define RW_Oneshot_Square 0x36
static void timer_interrupt_handler(struct interrupt_cpu_state *unused(r)) {
scheduler_yield();
}
void timer_init(void) {
interrupt_register_handler(Timer_IRQ_Number, timer_interrupt_handler);
}
void timer_set_phase(uint8_t hertz) {
uint8_t divisor = Timer_Magic_Number / hertz;
write_port(Timer_Command_Reg, RW_Oneshot_Square);
write_port(Timer_Chan_0, divisor & 0xff);
write_port(Timer_Chan_0, divisor >> 8);
pic_enable(Timer_IRQ_Number);
}
void timer_fini(void) {
interrupt_unregister_handler(Timer_IRQ_Number, timer_interrupt_handler);
}
| Remove annoying debug log message | Remove annoying debug log message
| C | mit | iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth |
ed51fe4a5dcdc3ed34b3af9fd7bf03b7cf5da30a | daemon.c | daemon.c | #include <errno.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
FILE* logfile;
void init() {
// Change the umask so we can write to log files
umask(0);
// We should initialize and open log files here
logfile = fopen("./creddit.log", "a");
if (logfile == NULL) {
printf("Failed to create file with error: %d\n", errno);
exit(errno);
}
}
void run() {
}
int main() {
pid_t pid = fork();
// Check to see if there was an error with the fork
if (pid < 0) exit(1);
// If we are the child, then we do the heavy lifting
if (pid == 0) {
init();
run();
}
// Elsewise, we are the parent and we want to exit gracefully
exit(0);
}
| #include <errno.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
FILE* logfile;
void init() {
// Change the umask so we can write to log files
umask(0);
// We should initialize and open log files here
logfile = fopen("./creddit.log", "a");
if (logfile == NULL) {
printf("Failed to create file with error: %d\n", errno);
exit(errno);
}
// Now we need to get a new unique SID so we aren't an orphan
// Remember our parent has died.
if (setsid() < 0) {
fprintf(logfile, "Could not set our SID: %d\n", errno);
exit(errno);
}
}
void run() {
}
int main() {
pid_t pid = fork();
// Check to see if there was an error with the fork
if (pid < 0) exit(1);
// If we are the child, then we do the heavy lifting
if (pid == 0) {
init();
run();
}
// Elsewise, we are the parent and we want to exit gracefully
exit(0);
}
| Modify session id and first test of logger | Modify session id and first test of logger
| C | mit | nguyenmp/creddit |
a64bbe186f064ccb5791d538fae3572c8e33df4b | src/lang-english.c | src/lang-english.c | #include "num2words.h"
const Language LANG_ENGLISH = {
.hours = {
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"ten",
"eleven",
"twelve"
},
.phrases = {
"*$1 o'clock ",
"five past *$1 ",
"ten past *$1 ",
"quarter past *$1 ",
"twenty past *$1 ",
"twenty five past *$1 ",
"half past *$1 ",
"twenty five to *$2 ",
"twenty to *$2 ",
"quarter to *$2 ",
"ten to *$2 ",
"five to *$2 "
},
#ifdef PBL_PLATFORM_CHALK
.greetings = {
"Good morning ",
"Good day ",
"Good evening ",
"Good night "
},
#else
.greetings = {
"Good mor- ning ",
"Good day ",
"Good even- ing ",
"Good night "
},
#endif
.connection_lost = "Where is your phone? "
};
| #include "num2words.h"
const Language LANG_ENGLISH = {
.hours = {
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"ten",
"eleven",
"twelve"
},
#ifdef PBL_PLATFORM_CHALK
.phrases = {
"*$1 o'clock ",
"five past *$1 ",
"ten past *$1 ",
"quarter past *$1 ",
"twenty past *$1 ",
"twenty five past *$1 ",
"half past *$1 ",
"twenty five to *$2 ",
"twenty to *$2 ",
"quarter to *$2 ",
"ten to *$2 ",
"five to *$2 "
},
.greetings = {
"Good morning ",
"Good day ",
"Good evening ",
"Good night "
},
#else
.phrases = {
"*$1 o'clock ",
"five past *$1 ",
"ten past *$1 ",
"quarter past *$1 ",
"twenty past *$1 ",
"twenty five past *$1 ",
"half past *$1 ",
"twenty five to *$2 ",
"twenty to *$2 ",
"quarter to *$2 ",
"ten to *$2 ",
"five to *$2 "
},
.greetings = {
"Good mor- ning ",
"Good day ",
"Good even- ing ",
"Good night "
},
#endif
.connection_lost = "Where is your phone? "
};
| Fix english language for new line length | Fix english language for new line length
| C | mit | Sarastro72/Fuzzy-Text-Watch-Plus,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Fuzzy-Text-Watch-Plus,Sarastro72/Fuzzy-Text-Watch-Plus,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Fuzzy-Text-Watch-Plus |
893e821a0bdd9807f243465301e9360e909e2ad0 | lib/log.h | lib/log.h | /* $Id$ */
#ifndef __log_h__
#define __log_h__
#include "internal.h"
#define UNSHIELD_LOG_LEVEL_LOWEST 0
#define UNSHIELD_LOG_LEVEL_ERROR 1
#define UNSHIELD_LOG_LEVEL_WARNING 2
#define UNSHIELD_LOG_LEVEL_TRACE 3
#define UNSHIELD_LOG_LEVEL_HIGHEST 4
#ifdef __cplusplus
extern "C"
{
#endif
void _unshield_log(int level, const char* file, int line, const char* format, ...);
#define unshield_trace(format, args...) \
_unshield_log(UNSHIELD_LOG_LEVEL_TRACE,__FUNCTION__, __LINE__, format, ##args)
#define unshield_warning(format, args...) \
_unshield_log(UNSHIELD_LOG_LEVEL_WARNING,__FUNCTION__, __LINE__, format, ##args)
#define unshield_warning_unless(cond, format, args...) \
if (!(cond)) \
_unshield_log(UNSHIELD_LOG_LEVEL_WARNING,__FUNCTION__, __LINE__, format, ##args)
#define unshield_error(format, args...) \
_unshield_log(UNSHIELD_LOG_LEVEL_ERROR,__FUNCTION__, __LINE__, format, ##args)
#ifdef __cplusplus
}
#endif
#endif
| /* $Id$ */
#ifndef __log_h__
#define __log_h__
#include "internal.h"
#define UNSHIELD_LOG_LEVEL_LOWEST 0
#define UNSHIELD_LOG_LEVEL_ERROR 1
#define UNSHIELD_LOG_LEVEL_WARNING 2
#define UNSHIELD_LOG_LEVEL_TRACE 3
#define UNSHIELD_LOG_LEVEL_HIGHEST 4
#ifdef __cplusplus
extern "C"
{
#endif
void _unshield_log(int level, const char* file, int line, const char* format, ...);
#define unshield_trace(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_TRACE,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
#define unshield_warning(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_WARNING,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
#define unshield_error(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_ERROR,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
#ifdef __cplusplus
}
#endif
#endif
| Use __VA_ARGS__ for better portability | Use __VA_ARGS__ for better portability
| C | mit | twogood/unshield,twogood/unshield |
ba6f0d85b45a08112bafe9a92c7174a46bc18bfd | lib/dns/rdata/rdatastructpre.h | lib/dns/rdata/rdatastructpre.h | /*
* Copyright (C) 1999, 2000 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef DNS_RDATASTRUCT_H
#define DNS_RDATASTRUCT_H 1
#include <isc/lang.h>
#include <isc/sockaddr.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
typedef struct dns_rdatacommon {
dns_rdataclass_t rdclass;
dns_rdatatype_t rdtype;
ISC_LINK(struct dns_rdatacommon) link;
} dns_rdatacommon_t;
| /*
* Copyright (C) 1999, 2000 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef DNS_RDATASTRUCT_H
#define DNS_RDATASTRUCT_H 1
#include <isc/lang.h>
#include <isc/sockaddr.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
typedef struct dns_rdatacommon {
dns_rdataclass_t rdclass;
dns_rdatatype_t rdtype;
ISC_LINK(struct dns_rdatacommon) link;
} dns_rdatacommon_t;
#define DNS_RDATACOMMON_INIT(DATA, RDTYPE, RDCLASS) \
do { \
(DATA)->common.rdtype = (RDTYPE); \
(DATA)->common.rdclass = (RDCLASS); \
ISC_LINK_INIT(&(DATA)->common, link); \
} while (0)
| Add macro to initalise the common part of a rdata struct. | Add macro to initalise the common part of a rdata struct.
| C | mpl-2.0 | pecharmin/bind9,pecharmin/bind9,each/bind9-collab,pecharmin/bind9,each/bind9-collab,each/bind9-collab,each/bind9-collab,pecharmin/bind9,pecharmin/bind9,each/bind9-collab,pecharmin/bind9,each/bind9-collab |
1a815fc00a1394e940afa8e007351a2fd948a889 | chapter1/1-9/linelength.c | chapter1/1-9/linelength.c | //
// Created by matti on 14.9.2015.
//
#include <stdio.h>
#define MAXLINE 1000
int getnewline(char line[], int maxline);
void copy(char to[], char from[]);
main() {
int len;
int max;
char line[MAXLINE];
char longest[MAXLINE];
max = 0;
while ((len = getnewline(line, MAXLINE)) > 0) {
if (len > max) {
max = len;
copy(longest, line);
}
}
if (max > 0) {
printf("%s", longest);
}
return 0;
}
int getnewline(char s[], int lim) {
int c, i;
for (i=0; i < lim-1 && (c=getchar()) != EOF && c != '\n'; ++i) {
s[i] = c;
}
if (c == '\n') {
s[i] = c;
++i;
}
s[i] = '\0';
return i;
}
void copy(char to[], char from[]) {
int i;
i = 0;
while((to[i] = from[i]) != '\0'){
++i;
}
} | Add line length example from chapter 1-9 | Add line length example from chapter 1-9
| C | mit | melonmanchan/k-and-r |
|
e25c3d3df50e6bbd6ee4bea906ca184952d3eb4a | simulator/infra/target.h | simulator/infra/target.h | /*
* target.h - input interface for Fetch module
* @author Pavel Kryukov [email protected]
* Copyright 2018 MIPT-MIPS
*/
#ifndef TARGET_H
#define TARGET_H
#include <infra/types.h>
/*
* Target is an input interface for Fetch module
* It contains
* * address where instruction should be fetched
* * sequence_id of fetched instruction for instrumentation purposes
* * validity bit
*/
struct Target {
Addr address = NO_VAL32;
uint64 sequence_id = NO_VAL64;
bool valid = false;
Target() = default;
Target(Addr a, uint64 id)
: address(a)
, sequence_id(id)
, valid(true)
{ }
};
#endif
| /*
* target.h - input interface for Fetch module
* @author Pavel Kryukov [email protected]
* Copyright 2018 MIPT-MIPS
*/
#ifndef TARGET_H
#define TARGET_H
#include <infra/types.h>
/*
* Target is an input interface for Fetch module
* It contains
* * address where instruction should be fetched
* * sequence_id of fetched instruction for instrumentation purposes
* * validity bit
*/
class Target {
public:
Addr address = NO_VAL32;
uint64 sequence_id = NO_VAL64;
bool valid = false;
Target() = default;
Target( Addr a, uint64 id)
: address( a)
, sequence_id( id)
, valid( true)
{ }
};
#endif
| Use 'class' keyword for Target to treat file as C++ | Use 'class' keyword for Target to treat file as C++ | C | mit | MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015 |
a757407ea2a4709594251e0c149883163e00af84 | extensions/common/xwalk_extension_messages.h | extensions/common/xwalk_extension_messages.h | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "ipc/ipc_message_macros.h"
#define IPC_MESSAGE_START ExtensionMsgStart
IPC_MESSAGE_ROUTED2(XWalkViewHostMsg_PostMessage, // NOLINT(*)
std::string /* target extension */,
std::string /* contents */)
IPC_MESSAGE_ROUTED2(XWalkViewMsg_PostMessage, // NOLINT(*)
std::string /* source extension */,
std::string /* contents */)
IPC_MESSAGE_CONTROL2(XWalkViewMsg_RegisterExtension, // NOLINT(*)
std::string /* extension */,
std::string /* JS API code for extension */)
| // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "ipc/ipc_message_macros.h"
// Note: it is safe to use numbers after LastIPCMsgStart since that limit
// is not relevant for embedders. It is used only by a tool inside chrome/
// that we currently don't use.
// See also https://code.google.com/p/chromium/issues/detail?id=110911.
const int XWalkExtensionMsgStart = LastIPCMsgStart + 1;
#define IPC_MESSAGE_START XWalkExtensionMsgStart
IPC_MESSAGE_ROUTED2(XWalkViewHostMsg_PostMessage, // NOLINT(*)
std::string /* target extension */,
std::string /* contents */)
IPC_MESSAGE_ROUTED2(XWalkViewMsg_PostMessage, // NOLINT(*)
std::string /* source extension */,
std::string /* contents */)
IPC_MESSAGE_CONTROL2(XWalkViewMsg_RegisterExtension, // NOLINT(*)
std::string /* extension */,
std::string /* JS API code for extension */)
| Use an unique ID for Crosswalk Extension IPC messages | Use an unique ID for Crosswalk Extension IPC messages
We were reusing ExtensionMsgStart, but it is not needed, we can simply
take a number after the existing ones. The LastIPCMsgStart is
currently used only by certain Chrome tools, so we won't miss anything
for being a number larger than the last.
| C | bsd-3-clause | crosswalk-project/crosswalk-efl,alex-zhang/crosswalk,xzhan96/crosswalk,lincsoon/crosswalk,DonnaWuDongxia/crosswalk,weiyirong/crosswalk-1,stonegithubs/crosswalk,baleboy/crosswalk,XiaosongWei/crosswalk,amaniak/crosswalk,mrunalk/crosswalk,crosswalk-project/crosswalk,PeterWangIntel/crosswalk,axinging/crosswalk,xzhan96/crosswalk,Pluto-tv/crosswalk,shaochangbin/crosswalk,mrunalk/crosswalk,kurli/crosswalk,leonhsl/crosswalk,zliang7/crosswalk,darktears/crosswalk,bestwpw/crosswalk,qjia7/crosswalk,TheDirtyCalvinist/spacewalk,myroot/crosswalk,rakuco/crosswalk,bestwpw/crosswalk,axinging/crosswalk,wuhengzhi/crosswalk,weiyirong/crosswalk-1,Shouqun/crosswalk,dreamsxin/crosswalk,fujunwei/crosswalk,huningxin/crosswalk,chuan9/crosswalk,huningxin/crosswalk,weiyirong/crosswalk-1,Pluto-tv/crosswalk,siovene/crosswalk,chinakids/crosswalk,amaniak/crosswalk,Bysmyyr/crosswalk,fujunwei/crosswalk,Pluto-tv/crosswalk,chuan9/crosswalk,xzhan96/crosswalk,amaniak/crosswalk,heke123/crosswalk,fujunwei/crosswalk,heke123/crosswalk,myroot/crosswalk,minggangw/crosswalk,rakuco/crosswalk,zliang7/crosswalk,bestwpw/crosswalk,jondwillis/crosswalk,Pluto-tv/crosswalk,jpike88/crosswalk,myroot/crosswalk,kurli/crosswalk,wuhengzhi/crosswalk,kurli/crosswalk,PeterWangIntel/crosswalk,marcuspridham/crosswalk,kurli/crosswalk,amaniak/crosswalk,RafuCater/crosswalk,alex-zhang/crosswalk,DonnaWuDongxia/crosswalk,siovene/crosswalk,baleboy/crosswalk,heke123/crosswalk,ZhengXinCN/crosswalk,chuan9/crosswalk,ZhengXinCN/crosswalk,stonegithubs/crosswalk,jondong/crosswalk,crosswalk-project/crosswalk-efl,RafuCater/crosswalk,jpike88/crosswalk,tomatell/crosswalk,pk-sam/crosswalk,seanlong/crosswalk,zliang7/crosswalk,pozdnyakov/crosswalk,crosswalk-project/crosswalk-efl,pk-sam/crosswalk,PeterWangIntel/crosswalk,shaochangbin/crosswalk,zliang7/crosswalk,PeterWangIntel/crosswalk,dreamsxin/crosswalk,zliang7/crosswalk,jondwillis/crosswalk,kurli/crosswalk,Bysmyyr/crosswalk,hgl888/crosswalk,hgl888/crosswalk-efl,myroot/crosswalk,qjia7/crosswalk,leonhsl/crosswalk,xzhan96/crosswalk,darktears/crosswalk,jpike88/crosswalk,crosswalk-project/crosswalk-efl,Bysmyyr/crosswalk,darktears/crosswalk,shaochangbin/crosswalk,pozdnyakov/crosswalk,baleboy/crosswalk,baleboy/crosswalk,xzhan96/crosswalk,chinakids/crosswalk,amaniak/crosswalk,marcuspridham/crosswalk,Bysmyyr/crosswalk,jondong/crosswalk,rakuco/crosswalk,xzhan96/crosswalk,heke123/crosswalk,pk-sam/crosswalk,leonhsl/crosswalk,DonnaWuDongxia/crosswalk,fujunwei/crosswalk,lincsoon/crosswalk,hgl888/crosswalk,fujunwei/crosswalk,jondong/crosswalk,jondong/crosswalk,alex-zhang/crosswalk,chinakids/crosswalk,RafuCater/crosswalk,seanlong/crosswalk,minggangw/crosswalk,Bysmyyr/crosswalk,weiyirong/crosswalk-1,rakuco/crosswalk,zeropool/crosswalk,ZhengXinCN/crosswalk,hgl888/crosswalk-efl,amaniak/crosswalk,Shouqun/crosswalk,alex-zhang/crosswalk,seanlong/crosswalk,jpike88/crosswalk,tedshroyer/crosswalk,crosswalk-project/crosswalk-efl,hgl888/crosswalk-efl,zeropool/crosswalk,TheDirtyCalvinist/spacewalk,dreamsxin/crosswalk,wuhengzhi/crosswalk,DonnaWuDongxia/crosswalk,zeropool/crosswalk,jondong/crosswalk,jondwillis/crosswalk,pk-sam/crosswalk,crosswalk-project/crosswalk,baleboy/crosswalk,dreamsxin/crosswalk,pozdnyakov/crosswalk,alex-zhang/crosswalk,Pluto-tv/crosswalk,crosswalk-project/crosswalk,lincsoon/crosswalk,stonegithubs/crosswalk,rakuco/crosswalk,seanlong/crosswalk,zeropool/crosswalk,siovene/crosswalk,shaochangbin/crosswalk,bestwpw/crosswalk,crosswalk-project/crosswalk-efl,jondwillis/crosswalk,chuan9/crosswalk,crosswalk-project/crosswalk,qjia7/crosswalk,leonhsl/crosswalk,tomatell/crosswalk,jpike88/crosswalk,TheDirtyCalvinist/spacewalk,rakuco/crosswalk,tedshroyer/crosswalk,XiaosongWei/crosswalk,chinakids/crosswalk,huningxin/crosswalk,jondong/crosswalk,marcuspridham/crosswalk,amaniak/crosswalk,heke123/crosswalk,shaochangbin/crosswalk,tomatell/crosswalk,Bysmyyr/crosswalk,RafuCater/crosswalk,stonegithubs/crosswalk,Pluto-tv/crosswalk,tedshroyer/crosswalk,myroot/crosswalk,xzhan96/crosswalk,zliang7/crosswalk,darktears/crosswalk,PeterWangIntel/crosswalk,pozdnyakov/crosswalk,pk-sam/crosswalk,XiaosongWei/crosswalk,RafuCater/crosswalk,darktears/crosswalk,marcuspridham/crosswalk,crosswalk-project/crosswalk,zeropool/crosswalk,seanlong/crosswalk,alex-zhang/crosswalk,minggangw/crosswalk,tomatell/crosswalk,dreamsxin/crosswalk,myroot/crosswalk,chuan9/crosswalk,wuhengzhi/crosswalk,seanlong/crosswalk,mrunalk/crosswalk,zliang7/crosswalk,minggangw/crosswalk,shaochangbin/crosswalk,xzhan96/crosswalk,hgl888/crosswalk-efl,hgl888/crosswalk-efl,stonegithubs/crosswalk,zliang7/crosswalk,lincsoon/crosswalk,leonhsl/crosswalk,chuan9/crosswalk,PeterWangIntel/crosswalk,bestwpw/crosswalk,minggangw/crosswalk,marcuspridham/crosswalk,zeropool/crosswalk,darktears/crosswalk,hgl888/crosswalk,alex-zhang/crosswalk,huningxin/crosswalk,leonhsl/crosswalk,minggangw/crosswalk,chuan9/crosswalk,PeterWangIntel/crosswalk,marcuspridham/crosswalk,Shouqun/crosswalk,crosswalk-project/crosswalk,rakuco/crosswalk,axinging/crosswalk,crosswalk-project/crosswalk-efl,axinging/crosswalk,DonnaWuDongxia/crosswalk,jondong/crosswalk,stonegithubs/crosswalk,heke123/crosswalk,tedshroyer/crosswalk,pk-sam/crosswalk,TheDirtyCalvinist/spacewalk,TheDirtyCalvinist/spacewalk,baleboy/crosswalk,lincsoon/crosswalk,chinakids/crosswalk,dreamsxin/crosswalk,darktears/crosswalk,tedshroyer/crosswalk,axinging/crosswalk,heke123/crosswalk,DonnaWuDongxia/crosswalk,jondong/crosswalk,axinging/crosswalk,bestwpw/crosswalk,ZhengXinCN/crosswalk,marcuspridham/crosswalk,crosswalk-project/crosswalk,mrunalk/crosswalk,weiyirong/crosswalk-1,siovene/crosswalk,qjia7/crosswalk,tedshroyer/crosswalk,wuhengzhi/crosswalk,tedshroyer/crosswalk,lincsoon/crosswalk,qjia7/crosswalk,Shouqun/crosswalk,stonegithubs/crosswalk,hgl888/crosswalk-efl,ZhengXinCN/crosswalk,pk-sam/crosswalk,hgl888/crosswalk,jpike88/crosswalk,hgl888/crosswalk,siovene/crosswalk,axinging/crosswalk,XiaosongWei/crosswalk,Shouqun/crosswalk,qjia7/crosswalk,rakuco/crosswalk,chinakids/crosswalk,RafuCater/crosswalk,hgl888/crosswalk,Bysmyyr/crosswalk,jondwillis/crosswalk,tomatell/crosswalk,leonhsl/crosswalk,fujunwei/crosswalk,weiyirong/crosswalk-1,jondwillis/crosswalk,lincsoon/crosswalk,XiaosongWei/crosswalk,crosswalk-project/crosswalk,zeropool/crosswalk,jondwillis/crosswalk,XiaosongWei/crosswalk,pozdnyakov/crosswalk,Shouqun/crosswalk,XiaosongWei/crosswalk,hgl888/crosswalk-efl,marcuspridham/crosswalk,bestwpw/crosswalk,DonnaWuDongxia/crosswalk,ZhengXinCN/crosswalk,fujunwei/crosswalk,Pluto-tv/crosswalk,baleboy/crosswalk,huningxin/crosswalk,pozdnyakov/crosswalk,heke123/crosswalk,minggangw/crosswalk,TheDirtyCalvinist/spacewalk,RafuCater/crosswalk,mrunalk/crosswalk,mrunalk/crosswalk,Bysmyyr/crosswalk,kurli/crosswalk,huningxin/crosswalk,darktears/crosswalk,lincsoon/crosswalk,jpike88/crosswalk,baleboy/crosswalk,ZhengXinCN/crosswalk,siovene/crosswalk,hgl888/crosswalk,hgl888/crosswalk,wuhengzhi/crosswalk,tomatell/crosswalk,weiyirong/crosswalk-1,dreamsxin/crosswalk,minggangw/crosswalk,tomatell/crosswalk,siovene/crosswalk |
f36a7bf58c305a14b50902cbf763211f6ef5e52f | MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c | MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c | /** @file
UEFI Runtime Services Table Library.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include <Uefi.h>
#include <Library/DebugLib.h>
EFI_RUNTIME_SERVICES *gRT = NULL;
/**
The constructor function caches the pointer of Runtime Services Table.
The constructor function caches the pointer of Runtime Services Table.
It will ASSERT() if the pointer of Runtime Services Table is NULL.
It will always return EFI_SUCCESS.
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
EFI_STATUS
EFIAPI
UefiRuntimeServicesTableLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
//
// Cache pointer to the EFI Runtime Services Table
//
gRT = SystemTable->RuntimeServices;
ASSERT (gRT != NULL);
return EFI_SUCCESS;
}
| /** @file
UEFI Runtime Services Table Library.
This library instance retrieve EFI_RUNTIME_SERVICES pointer from EFI system table
in library's constructor.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include <Uefi.h>
#include <Library/DebugLib.h>
EFI_RUNTIME_SERVICES *gRT = NULL;
/**
The constructor function caches the pointer of Runtime Services Table.
The constructor function caches the pointer of Runtime Services Table.
It will ASSERT() if the pointer of Runtime Services Table is NULL.
It will always return EFI_SUCCESS.
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
EFI_STATUS
EFIAPI
UefiRuntimeServicesTableLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
//
// Cache pointer to the EFI Runtime Services Table
//
gRT = SystemTable->RuntimeServices;
ASSERT (gRT != NULL);
return EFI_SUCCESS;
}
| Add more comment for library instance and remove unused internal header file. | Add more comment for library instance and remove unused internal header file.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@5799 6f19259b-4bc3-4df7-8a09-765794883524
| C | bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 |
bb1eba50d7b6e81e24ddc918afda45a334d011de | src/MenuRenderer.h | src/MenuRenderer.h | /*
* MenuRenderer.h
*
* Created on: Nov 18, 2016
* Author: msaun
*/
#ifndef MICKRENDERER_H_
#define MICKRENDERER_H_
#include <string>
#include "RuntimeException.h"
#include <SDL2/SDL.h>
#include <GL/glew.h>
#include <Rocket/Core.h>
#include <Rocket/Core/Input.h>
#include <Rocket/Debugger/Debugger.h>
#include "rocket/glue/SystemInterfaceSDL2.h"
#include "rocket/glue/RenderInterfaceSDL2.h"
#include "rocket/glue/ShellFileInterface.h"
#include "rocket/MickRocketElementUtil.h"
#include "GameSettings.h"
#include "rocket/events/EventInstancer.h"
#include "rocket/events/EventManager.h"
#include "rocket/events/EventHandlerOptions.h"
class MenuRenderer
{
public:
MenuRenderer(SDL_Renderer *renderer, SDL_Window *screen);
bool showMenu();
virtual ~MenuRenderer();
private:
void init(SDL_Renderer* renderer, SDL_Window *screen);
int getTabIndex(Rocket::Core::Element* node);
Rocket::Core::Element* getChildElementWithTabIndex(Rocket::Core::Element* parentNode, int tabIndex);
Rocket::Core::Context* m_context = NULL;
};
#endif /* MICKRENDERER_H_ */
| /*
* MenuRenderer.h
*
* Created on: Nov 18, 2016
* Author: msaun
*/
#ifndef MICKRENDERER_H_
#define MICKRENDERER_H_
#include <stdexcept>
#include <string>
#include "RuntimeException.h"
#include <SDL2/SDL.h>
#include <GL/glew.h>
#include <Rocket/Core.h>
#include <Rocket/Core/Input.h>
#include <Rocket/Debugger/Debugger.h>
#include "rocket/glue/SystemInterfaceSDL2.h"
#include "rocket/glue/RenderInterfaceSDL2.h"
#include "rocket/glue/ShellFileInterface.h"
#include "rocket/MickRocketElementUtil.h"
#include "GameSettings.h"
#include "rocket/events/EventInstancer.h"
#include "rocket/events/EventManager.h"
#include "rocket/events/EventHandlerOptions.h"
class MenuRenderer
{
public:
MenuRenderer(SDL_Renderer *renderer, SDL_Window *screen);
bool showMenu();
virtual ~MenuRenderer();
private:
void init(SDL_Renderer* renderer, SDL_Window *screen);
int getTabIndex(Rocket::Core::Element* node);
Rocket::Core::Element* getChildElementWithTabIndex(Rocket::Core::Element* parentNode, int tabIndex);
Rocket::Core::Context* m_context = NULL;
};
#endif /* MICKRENDERER_H_ */
| Fix runtime_error is not a member of std | Fix runtime_error is not a member of std
| C | apache-2.0 | VenKamikaze/BitRiot,VenKamikaze/BitRiot,VenKamikaze/BitRiot |
86258141b55c3fffb3489f76fc1cf70d2dcd4bb2 | libmorton/include/morton_common.h | libmorton/include/morton_common.h | #ifndef MORTON_COMMON_H_
#define MORTON_COMMON_H_
#include <stdint.h>
#if _MSC_VER
#include <intrin.h>
#endif
inline bool findFirstSetBit32(const uint_fast32_t x, unsigned long* firstbit_location){
#if _MSC_VER
return _BitScanReverse(firstbit_location, x);
#elif __GNUC__
unsigned int pos = __builtin_ffs(x);
firstbit_location = pos +1 ;
return pos;
#endif
return true;
}
inline bool findFirstSetBit64(const uint_fast64_t x, unsigned long* firstbit_location){
#if _MSC_VER && _WIN64
return _BitScanReverse64(firstbit_location, x);
#elif _MSC_VER && _WIN32
firstbit_location = 0;
if (_BitScanReverse(&firstbit_location, (x >> 32))){ // check first part
firstbit_location += 32;
} else if ( ! _BitScanReverse(&firstbit_location, (x & 0xFFFFFFFF))){ // also test last part
return 0;
}
return true;
#elif __GNUC__
unsigned int pos = __builtin_ffs(x);
first_bit_location = pos + 1;
return pos;
#endif
return true;
}
#endif | #ifndef MORTON_COMMON_H_
#define MORTON_COMMON_H_
#include <stdint.h>
#if _MSC_VER
#include <intrin.h>
#endif
inline bool findFirstSetBit32(const uint_fast32_t x, unsigned long* firstbit_location){
#if _MSC_VER
return _BitScanReverse(firstbit_location, x);
#elif __GNUC__
unsigned int pos = __builtin_ffs(x);
firstbit_location = pos +1 ;
return pos;
#endif
return true;
}
inline bool findFirstSetBit64(const uint_fast64_t x, unsigned long* firstbit_location){
#if _MSC_VER && _WIN64
return _BitScanReverse64(firstbit_location, x);
#elif _MSC_VER && _WIN32
firstbit_location = 0;
if (_BitScanReverse(firstbit_location, (x >> 32))){ // check first part
firstbit_location += 32;
} else if ( ! _BitScanReverse(firstbit_location, (x & 0xFFFFFFFF))){ // also test last part
return 0;
}
return true;
#elif __GNUC__
unsigned int pos = __builtin_ffs(x);
first_bit_location = pos + 1;
return pos;
#endif
return true;
}
#endif | Fix compil on MSVC + WIN32 | Fix compil on MSVC + WIN32
| C | mit | Forceflow/libmorton |
c1e1523fed7ad8b621425b2931c8ce89389a6f7c | libyaul/scu/bus/b/vdp1/vdp1/map.h | libyaul/scu/bus/b/vdp1/vdp1/map.h | /*
* Copyright (c) 2012-2016 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <[email protected]>
*/
#ifndef _VDP1_MAP_H_
#define _VDP1_MAP_H_
#include <scu-internal.h>
/* Macros specific for processor */
#define VDP1(x) (0x25D00000 + (x))
/* Helpers specific to this processor */
#define TVMR 0x0000
#define FBCR 0x0002
#define PTMR 0x0004
#define EWDR 0x0006
#define EWLR 0x0008
#define EWRR 0x000A
#define ENDR 0x000C
#define EDSR 0x0010
#define LOPR 0x0012
#define COPR 0x0014
#define MODR 0x0016
#endif /* !_VDP1_MAP_H_ */
| /*
* Copyright (c) 2012-2016 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <[email protected]>
*/
#ifndef _VDP1_MAP_H_
#define _VDP1_MAP_H_
#include <scu-internal.h>
/* Macros specific for processor */
#define VDP1(x) (0x25D00000 + (x))
/* Helpers specific to this processor */
#define TVMR 0x0000
#define FBCR 0x0002
#define PTMR 0x0004
#define EWDR 0x0006
#define EWLR 0x0008
#define EWRR 0x000A
#define ENDR 0x000C
#define EDSR 0x0010
#define LOPR 0x0012
#define COPR 0x0014
#define MODR 0x0016
#endif /* !_VDP1_MAP_H_ */
| Remove hard tabs in .h file | Remove hard tabs in .h file
| C | mit | ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul |
37500dc24511e9ea1d16982befdb6beb17bfeea5 | test/CodeGen/thinlto_backend.c | test/CodeGen/thinlto_backend.c | // RUN: %clang -target x86_64-unknown-linux -O2 %s -flto=thin -c -o %t.o
// RUN: llvm-lto -thinlto -o %t %t.o
// Ensure clang -cc1 give expected error for incorrect input type
// RUN: not %clang_cc1 -target x86_64-unknown-linux -O2 -o %t1.o %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
// CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir'
// Ensure we get expected error for missing index file
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR
// CHECK-ERROR: Error loading index file 'bad.thinlto.bc': No such file or directory
// Ensure Function Importing pass added
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=%t.thinlto.bc -mllvm -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=CHECK-PASS
// CHECK-PASS: Function Importing
| // RUN: %clang -target x86_64-unknown-linux -O2 %s -flto=thin -c -o %t.o
// RUN: llvm-lto -thinlto -o %t %t.o
// Ensure clang -cc1 give expected error for incorrect input type
// RUN: not %clang_cc1 -target x86_64-unknown-linux -O2 -o %t1.o %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
// CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir'
// Ensure we get expected error for missing index file
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR
// CHECK-ERROR: Error loading index file 'bad.thinlto.bc'
// Ensure Function Importing pass added
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=%t.thinlto.bc -mllvm -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=CHECK-PASS
// CHECK-PASS: Function Importing
| Adjust test to fix bot error from r254927. | Adjust test to fix bot error from r254927.
Remove the part of the error message that may vary across systems.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@254938 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang |
bc49e006724135994717b71920f1376161f28190 | include/ecdaa.h | include/ecdaa.h | /******************************************************************************
*
* Copyright 2017 Xaptum, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*
*****************************************************************************/
#ifndef ECDAA_ECDAA_H
#define ECDAA_ECDAA_H
#pragma once
#include <ecdaa/credential_ZZZ.h>
#include <ecdaa/group_public_key_ZZZ.h>
#include <ecdaa/issuer_keypair_ZZZ.h>
#include <ecdaa/member_keypair_ZZZ.h>
#include <ecdaa/prng.h>
#include <ecdaa/revocations_ZZZ.h>
#include <ecdaa/signature_ZZZ.h>
#include <ecdaa/signature_TPM.h>
#include <ecdaa/tpm_context.h>
#endif
| /******************************************************************************
*
* Copyright 2017 Xaptum, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*
*****************************************************************************/
#ifndef ECDAA_ECDAA_H
#define ECDAA_ECDAA_H
#pragma once
#include <ecdaa/credential_ZZZ.h>
#include <ecdaa/group_public_key_ZZZ.h>
#include <ecdaa/issuer_keypair_ZZZ.h>
#include <ecdaa/member_keypair_ZZZ.h>
#include <ecdaa/prng.h>
#include <ecdaa/revocations_ZZZ.h>
#include <ecdaa/signature_ZZZ.h>
#include <ecdaa/member_keypair_TPM.h>
#include <ecdaa/signature_TPM.h>
#include <ecdaa/tpm_context.h>
#endif
| Include member_keypair_TPM.h in omnibus include file. | FIX: Include member_keypair_TPM.h in omnibus include file.
| C | apache-2.0 | xaptum/ecdaa,xaptum/ecdaa,xaptum/ecdaa |
111ea9fc3f1daf1fdcbdacfdcc830873e03b6cb7 | Examples/src/main.c | Examples/src/main.c | #include <ConsoleControl.h>
#include <ConsoleControlUtility.h>
#include <ConsoleControlUI.h>
#include <BasicExamples.h>
int main() {
const char* choices[] = {
"Basic features",
"UI features",
"Exit",
};
const cc_MenuColors colors = {
BLACK,
CYAN,
BLACK,
WHITE,
BLACK,
CYAN,
BLACK
};
cc_Menu menu;
menu.title = "ConsoleControl Examples";
menu.choices = choices;
menu.choicesNumber = 3;
menu.choiceOnEscape = 2;
menu.currentChoice = 0;
bool loop = true;
while(loop) {
cc_displayColorMenu(&menu, &colors);
cc_setColors(BLACK, WHITE);
switch(menu.currentChoice) {
case 0:
basicExamples();
break;
case 1:
//TODO
break;
case 2:
loop = false;
break;
default:
break;
}
}
return EXIT_SUCCESS;
}
| #include <ConsoleControl.h>
#include <ConsoleControlUtility.h>
#include <ConsoleControlUI.h>
#include <BasicExamples.h>
int main() {
const char* choices[] = {
"Basic features",
"UI features",
"Exit",
};
const cc_MenuColors colors = {
BLACK,
CYAN,
BLACK,
WHITE,
BLACK,
CYAN,
BLACK
};
cc_Menu menu;
menu.title = "ConsoleControl Examples";
menu.choices = choices;
menu.choicesNumber = 3;
menu.choiceOnEscape = 2;
menu.currentChoice = 0;
bool loop = true;
while(loop) {
cc_displayColorMenu(&menu, &colors);
cc_setColors(BLACK, WHITE);
switch(menu.currentChoice) {
case 0:
basicExamples();
break;
case 1:
//TODO
break;
case 2:
loop = false;
break;
default:
break;
}
}
cc_setCursorVisibility(true);
cc_displayInputs(true);
return EXIT_SUCCESS;
}
| Set back the cursor and inputs visibility in the examples | Set back the cursor and inputs visibility in the examples
| C | mit | pinam45/ConsoleControl,pinam45/ConsoleControl |
c13d9c1fb787982bd791975f9f7f6cc8f793d1e6 | tests/testrender.c | tests/testrender.c | /* $Id$ */
#include "GL/glc.h"
#include <stdio.h>
extern void my_init(void);
extern void my_fini(void);
void testQueso(void)
{
int ctx = 0;
int font = 0;
my_init();
ctx = glcGenContext();
glcContext(ctx);
glcAppendCatalog("/usr/lib/X11/fonts/Type1");
glcFontFace(glcNewFontFromFamily(1, "Utopia"), "Bold");
font = glcNewFontFromFamily(2, "Courier");
glcFont(font);
glcFontFace(font, "Italic");
glcRenderStyle(GLC_LINE);
glScalef(24., 24., 0.);
glTranslatef(100., 100., 0.);
glColor3f(1., 1., 0.);
glcRenderChar('A');
my_fini();
}
| /* $Id$ */
#include "GL/glc.h"
#include <stdio.h>
extern void my_init(void);
extern void my_fini(void);
void testQueso(void)
{
int ctx = 0;
int font = 0;
my_init();
ctx = glcGenContext();
glcContext(ctx);
glcAppendCatalog("/usr/lib/X11/fonts/Type1");
glcFontFace(glcNewFontFromFamily(1, "Utopia"), "Bold");
font = glcNewFontFromFamily(2, "Courier");
glcFont(font);
glcFontFace(font, "Italic");
glcRenderStyle(GLC_TRIANGLE);
glTranslatef(100., 100., 0.);
glScalef(10., 10., 0.);
glColor3f(1., 1., 0.);
glcRenderChar('A');
glcRenderChar('l');
glTranslatef(-50., 100., 0.);
glcRenderString("QuesoGLC");
my_fini();
}
| Test of rendering commands is now a bit more complex | Test of rendering commands is now a bit more complex
| C | lgpl-2.1 | Safety0ff/QuesoGLC,Safety0ff/QuesoGLC,Safety0ff/QuesoGLC |
ef39b128e18a557777c1223531f63e3da9fc8e48 | Settings/Tabs/OSD.h | Settings/Tabs/OSD.h | #pragma once
#include "../Controls/Controls.h"
#include "SettingsTab.h"
class OSD : public SettingsTab {
public:
OSD(HINSTANCE hInstance, LPCWSTR tabTemplate, LPCWSTR title = L"");
virtual void SaveSettings();
protected:
virtual void Initialize();
virtual void LoadSettings();
private:
/* Controls: */
ListView *_osdList;
GroupBox *_volumeGroup;
Checkbox *_monitorVolEvents;
ComboBox *_audioDevice;
ComboBox *_audioTaper;
//Slider
Label *_limitValue;
Checkbox *_forceLimit;
GroupBox *_ejectGroup;
Checkbox *_monitorEjectEvents;
GroupBox *_keyboardGroup;
Checkbox *_caps;
Checkbox *_scroll;
Checkbox *_num;
Checkbox *_media;
};
| #pragma once
#include "SettingsTab.h"
class OSD : public SettingsTab {
public:
OSD(HINSTANCE hInstance, LPCWSTR tabTemplate, LPCWSTR title = L"");
virtual void SaveSettings();
protected:
virtual void Initialize();
virtual void LoadSettings();
private:
/* Controls: */
ListView *_osdList;
GroupBox *_volumeGroup;
Checkbox *_monitorVolEvents;
ComboBox *_audioDevice;
ComboBox *_audioTaper;
//Slider
Label *_limitValue;
Checkbox *_forceLimit;
GroupBox *_ejectGroup;
Checkbox *_monitorEjectEvents;
GroupBox *_keyboardGroup;
Checkbox *_caps;
Checkbox *_scroll;
Checkbox *_num;
Checkbox *_media;
};
| Remove controls header (moved to SettingsTab) | Remove controls header (moved to SettingsTab)
| C | bsd-2-clause | malensek/3RVX,malensek/3RVX,malensek/3RVX |
889d50ff21e47e3c33ea4ab7178a9680ac49f520 | vsprojects/dummy.c | vsprojects/dummy.c | /*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
| /*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
| Fix newline at end of file | Fix newline at end of file
| C | bsd-3-clause | grani/grpc,a11r/grpc,nicolasnoble/grpc,thunderboltsid/grpc,ppietrasa/grpc,kumaralokgithub/grpc,adelez/grpc,apolcyn/grpc,greasypizza/grpc,carl-mastrangelo/grpc,donnadionne/grpc,sreecha/grpc,infinit/grpc,jboeuf/grpc,miselin/grpc,jboeuf/grpc,vsco/grpc,msiedlarek/grpc,jboeuf/grpc,apolcyn/grpc,murgatroid99/grpc,makdharma/grpc,zhimingxie/grpc,a-veitch/grpc,malexzx/grpc,stanley-cheung/grpc,geffzhang/grpc,pmarks-net/grpc,dgquintas/grpc,tengyifei/grpc,thinkerou/grpc,thunderboltsid/grpc,murgatroid99/grpc,muxi/grpc,7anner/grpc,geffzhang/grpc,deepaklukose/grpc,Crevil/grpc,matt-kwong/grpc,yongni/grpc,wcevans/grpc,tamihiro/grpc,yang-g/grpc,baylabs/grpc,grani/grpc,kumaralokgithub/grpc,a-veitch/grpc,goldenbull/grpc,Vizerai/grpc,philcleveland/grpc,carl-mastrangelo/grpc,carl-mastrangelo/grpc,PeterFaiman/ruby-grpc-minimal,ipylypiv/grpc,zhimingxie/grpc,7anner/grpc,dklempner/grpc,donnadionne/grpc,ipylypiv/grpc,chrisdunelm/grpc,stanley-cheung/grpc,philcleveland/grpc,yang-g/grpc,malexzx/grpc,LuminateWireless/grpc,baylabs/grpc,andrewpollock/grpc,zhimingxie/grpc,jtattermusch/grpc,perumaalgoog/grpc,LuminateWireless/grpc,a11r/grpc,geffzhang/grpc,daniel-j-born/grpc,soltanmm/grpc,apolcyn/grpc,carl-mastrangelo/grpc,Crevil/grpc,jtattermusch/grpc,pmarks-net/grpc,ejona86/grpc,muxi/grpc,daniel-j-born/grpc,apolcyn/grpc,y-zeng/grpc,carl-mastrangelo/grpc,stanley-cheung/grpc,baylabs/grpc,jtattermusch/grpc,murgatroid99/grpc,bogdandrutu/grpc,sreecha/grpc,zhimingxie/grpc,thinkerou/grpc,ipylypiv/grpc,ipylypiv/grpc,rjshade/grpc,muxi/grpc,adelez/grpc,carl-mastrangelo/grpc,malexzx/grpc,grani/grpc,mehrdada/grpc,nicolasnoble/grpc,LuminateWireless/grpc,chrisdunelm/grpc,arkmaxim/grpc,VcamX/grpc,wcevans/grpc,miselin/grpc,hstefan/grpc,donnadionne/grpc,geffzhang/grpc,miselin/grpc,perumaalgoog/grpc,goldenbull/grpc,fuchsia-mirror/third_party-grpc,infinit/grpc,firebase/grpc,yongni/grpc,apolcyn/grpc,7anner/grpc,dgquintas/grpc,podsvirov/grpc,perumaalgoog/grpc,chrisdunelm/grpc,adelez/grpc,leifurhauks/grpc,philcleveland/grpc,arkmaxim/grpc,kskalski/grpc,philcleveland/grpc,muxi/grpc,MakMukhi/grpc,LuminateWireless/grpc,PeterFaiman/ruby-grpc-minimal,vsco/grpc,jboeuf/grpc,nicolasnoble/grpc,kumaralokgithub/grpc,Crevil/grpc,kriswuollett/grpc,yugui/grpc,bogdandrutu/grpc,jboeuf/grpc,soltanmm/grpc,kskalski/grpc,zhimingxie/grpc,PeterFaiman/ruby-grpc-minimal,rjshade/grpc,a11r/grpc,greasypizza/grpc,philcleveland/grpc,infinit/grpc,msiedlarek/grpc,chrisdunelm/grpc,pszemus/grpc,y-zeng/grpc,kskalski/grpc,kskalski/grpc,VcamX/grpc,Vizerai/grpc,chrisdunelm/grpc,stanley-cheung/grpc,dgquintas/grpc,7anner/grpc,jtattermusch/grpc,chrisdunelm/grpc,MakMukhi/grpc,kpayson64/grpc,sreecha/grpc,kumaralokgithub/grpc,geffzhang/grpc,vjpai/grpc,simonkuang/grpc,kpayson64/grpc,tengyifei/grpc,yongni/grpc,ppietrasa/grpc,LuminateWireless/grpc,tamihiro/grpc,dklempner/grpc,ctiller/grpc,jtattermusch/grpc,greasypizza/grpc,miselin/grpc,kskalski/grpc,andrewpollock/grpc,ppietrasa/grpc,sreecha/grpc,zhimingxie/grpc,tamihiro/grpc,firebase/grpc,tengyifei/grpc,firebase/grpc,wcevans/grpc,soltanmm/grpc,hstefan/grpc,grpc/grpc,muxi/grpc,kumaralokgithub/grpc,rjshade/grpc,leifurhauks/grpc,tamihiro/grpc,soltanmm-google/grpc,jtattermusch/grpc,msiedlarek/grpc,yongni/grpc,kriswuollett/grpc,soltanmm-google/grpc,murgatroid99/grpc,soltanmm-google/grpc,rjshade/grpc,yang-g/grpc,msmania/grpc,grpc/grpc,ananthonline/grpc,fuchsia-mirror/third_party-grpc,quizlet/grpc,Vizerai/grpc,a-veitch/grpc,dgquintas/grpc,thinkerou/grpc,kriswuollett/grpc,greasypizza/grpc,Vizerai/grpc,soltanmm-google/grpc,ejona86/grpc,quizlet/grpc,stanley-cheung/grpc,kpayson64/grpc,makdharma/grpc,hstefan/grpc,jcanizales/grpc,podsvirov/grpc,donnadionne/grpc,zhimingxie/grpc,matt-kwong/grpc,leifurhauks/grpc,makdharma/grpc,jboeuf/grpc,bogdandrutu/grpc,firebase/grpc,pmarks-net/grpc,PeterFaiman/ruby-grpc-minimal,matt-kwong/grpc,msiedlarek/grpc,ejona86/grpc,stanley-cheung/grpc,yang-g/grpc,quizlet/grpc,philcleveland/grpc,Crevil/grpc,a11r/grpc,hstefan/grpc,PeterFaiman/ruby-grpc-minimal,kumaralokgithub/grpc,goldenbull/grpc,adelez/grpc,royalharsh/grpc,vsco/grpc,greasypizza/grpc,podsvirov/grpc,daniel-j-born/grpc,tengyifei/grpc,podsvirov/grpc,pszemus/grpc,adelez/grpc,pszemus/grpc,yang-g/grpc,carl-mastrangelo/grpc,thinkerou/grpc,thunderboltsid/grpc,ejona86/grpc,a-veitch/grpc,carl-mastrangelo/grpc,infinit/grpc,pszemus/grpc,7anner/grpc,ctiller/grpc,wcevans/grpc,ncteisen/grpc,ncteisen/grpc,grpc/grpc,ipylypiv/grpc,grani/grpc,soltanmm-google/grpc,ejona86/grpc,vjpai/grpc,ctiller/grpc,murgatroid99/grpc,mehrdada/grpc,royalharsh/grpc,matt-kwong/grpc,bogdandrutu/grpc,mehrdada/grpc,dklempner/grpc,quizlet/grpc,ananthonline/grpc,arkmaxim/grpc,thunderboltsid/grpc,ncteisen/grpc,wcevans/grpc,murgatroid99/grpc,geffzhang/grpc,thinkerou/grpc,a-veitch/grpc,daniel-j-born/grpc,matt-kwong/grpc,msmania/grpc,MakMukhi/grpc,simonkuang/grpc,firebase/grpc,dgquintas/grpc,thinkerou/grpc,philcleveland/grpc,andrewpollock/grpc,donnadionne/grpc,muxi/grpc,quizlet/grpc,baylabs/grpc,a11r/grpc,wcevans/grpc,goldenbull/grpc,VcamX/grpc,stanley-cheung/grpc,Vizerai/grpc,royalharsh/grpc,makdharma/grpc,ejona86/grpc,malexzx/grpc,apolcyn/grpc,jboeuf/grpc,vjpai/grpc,greasypizza/grpc,soltanmm/grpc,grani/grpc,ananthonline/grpc,carl-mastrangelo/grpc,grpc/grpc,kpayson64/grpc,goldenbull/grpc,muxi/grpc,jtattermusch/grpc,MakMukhi/grpc,dklempner/grpc,LuminateWireless/grpc,sreecha/grpc,yongni/grpc,pmarks-net/grpc,msmania/grpc,grpc/grpc,kpayson64/grpc,infinit/grpc,kriswuollett/grpc,firebase/grpc,rjshade/grpc,stanley-cheung/grpc,royalharsh/grpc,Vizerai/grpc,tamihiro/grpc,pszemus/grpc,MakMukhi/grpc,daniel-j-born/grpc,yang-g/grpc,bogdandrutu/grpc,daniel-j-born/grpc,hstefan/grpc,perumaalgoog/grpc,MakMukhi/grpc,a-veitch/grpc,kriswuollett/grpc,andrewpollock/grpc,7anner/grpc,thinkerou/grpc,a-veitch/grpc,pmarks-net/grpc,Crevil/grpc,kskalski/grpc,vjpai/grpc,nicolasnoble/grpc,deepaklukose/grpc,jcanizales/grpc,a-veitch/grpc,vjpai/grpc,kskalski/grpc,makdharma/grpc,PeterFaiman/ruby-grpc-minimal,pmarks-net/grpc,makdharma/grpc,pszemus/grpc,goldenbull/grpc,rjshade/grpc,ppietrasa/grpc,donnadionne/grpc,kumaralokgithub/grpc,yugui/grpc,perumaalgoog/grpc,greasypizza/grpc,matt-kwong/grpc,stanley-cheung/grpc,leifurhauks/grpc,msmania/grpc,thinkerou/grpc,VcamX/grpc,stanley-cheung/grpc,perumaalgoog/grpc,jcanizales/grpc,bogdandrutu/grpc,mehrdada/grpc,y-zeng/grpc,ananthonline/grpc,arkmaxim/grpc,carl-mastrangelo/grpc,simonkuang/grpc,muxi/grpc,grpc/grpc,yang-g/grpc,wcevans/grpc,thunderboltsid/grpc,tengyifei/grpc,miselin/grpc,pmarks-net/grpc,makdharma/grpc,Crevil/grpc,vjpai/grpc,thinkerou/grpc,sreecha/grpc,dgquintas/grpc,nicolasnoble/grpc,jcanizales/grpc,jcanizales/grpc,MakMukhi/grpc,jcanizales/grpc,yugui/grpc,wcevans/grpc,perumaalgoog/grpc,jboeuf/grpc,y-zeng/grpc,jboeuf/grpc,miselin/grpc,murgatroid99/grpc,nicolasnoble/grpc,simonkuang/grpc,malexzx/grpc,hstefan/grpc,fuchsia-mirror/third_party-grpc,kriswuollett/grpc,ctiller/grpc,andrewpollock/grpc,kumaralokgithub/grpc,pszemus/grpc,jtattermusch/grpc,mehrdada/grpc,fuchsia-mirror/third_party-grpc,Crevil/grpc,podsvirov/grpc,pszemus/grpc,donnadionne/grpc,tengyifei/grpc,podsvirov/grpc,miselin/grpc,PeterFaiman/ruby-grpc-minimal,grpc/grpc,nicolasnoble/grpc,ctiller/grpc,mehrdada/grpc,makdharma/grpc,leifurhauks/grpc,geffzhang/grpc,ananthonline/grpc,firebase/grpc,vjpai/grpc,podsvirov/grpc,deepaklukose/grpc,LuminateWireless/grpc,yugui/grpc,baylabs/grpc,dgquintas/grpc,fuchsia-mirror/third_party-grpc,royalharsh/grpc,dgquintas/grpc,arkmaxim/grpc,vjpai/grpc,ejona86/grpc,podsvirov/grpc,rjshade/grpc,MakMukhi/grpc,malexzx/grpc,ejona86/grpc,chrisdunelm/grpc,carl-mastrangelo/grpc,mehrdada/grpc,chrisdunelm/grpc,infinit/grpc,mehrdada/grpc,kriswuollett/grpc,arkmaxim/grpc,donnadionne/grpc,dklempner/grpc,msmania/grpc,VcamX/grpc,vsco/grpc,matt-kwong/grpc,7anner/grpc,msmania/grpc,ctiller/grpc,apolcyn/grpc,wcevans/grpc,murgatroid99/grpc,kriswuollett/grpc,vjpai/grpc,miselin/grpc,vsco/grpc,Crevil/grpc,ananthonline/grpc,apolcyn/grpc,yugui/grpc,soltanmm/grpc,fuchsia-mirror/third_party-grpc,kskalski/grpc,grpc/grpc,ncteisen/grpc,ctiller/grpc,quizlet/grpc,pszemus/grpc,pszemus/grpc,VcamX/grpc,matt-kwong/grpc,7anner/grpc,vsco/grpc,infinit/grpc,a11r/grpc,mehrdada/grpc,msiedlarek/grpc,thinkerou/grpc,pszemus/grpc,muxi/grpc,a11r/grpc,grpc/grpc,PeterFaiman/ruby-grpc-minimal,stanley-cheung/grpc,rjshade/grpc,yongni/grpc,tamihiro/grpc,murgatroid99/grpc,LuminateWireless/grpc,Vizerai/grpc,bogdandrutu/grpc,thunderboltsid/grpc,adelez/grpc,ejona86/grpc,leifurhauks/grpc,dgquintas/grpc,dklempner/grpc,yang-g/grpc,pmarks-net/grpc,andrewpollock/grpc,ananthonline/grpc,kpayson64/grpc,yugui/grpc,andrewpollock/grpc,tengyifei/grpc,jtattermusch/grpc,nicolasnoble/grpc,soltanmm-google/grpc,jboeuf/grpc,ananthonline/grpc,soltanmm/grpc,LuminateWireless/grpc,ncteisen/grpc,sreecha/grpc,makdharma/grpc,quizlet/grpc,baylabs/grpc,royalharsh/grpc,tengyifei/grpc,dklempner/grpc,thinkerou/grpc,donnadionne/grpc,Vizerai/grpc,nicolasnoble/grpc,vsco/grpc,tengyifei/grpc,leifurhauks/grpc,sreecha/grpc,soltanmm/grpc,grani/grpc,adelez/grpc,PeterFaiman/ruby-grpc-minimal,simonkuang/grpc,philcleveland/grpc,donnadionne/grpc,jboeuf/grpc,ncteisen/grpc,ctiller/grpc,ananthonline/grpc,Vizerai/grpc,y-zeng/grpc,vsco/grpc,baylabs/grpc,sreecha/grpc,adelez/grpc,perumaalgoog/grpc,geffzhang/grpc,grpc/grpc,ejona86/grpc,pmarks-net/grpc,simonkuang/grpc,y-zeng/grpc,zhimingxie/grpc,y-zeng/grpc,a-veitch/grpc,firebase/grpc,ppietrasa/grpc,infinit/grpc,soltanmm-google/grpc,a11r/grpc,podsvirov/grpc,philcleveland/grpc,leifurhauks/grpc,arkmaxim/grpc,carl-mastrangelo/grpc,ejona86/grpc,yugui/grpc,jcanizales/grpc,quizlet/grpc,PeterFaiman/ruby-grpc-minimal,donnadionne/grpc,jcanizales/grpc,yugui/grpc,ctiller/grpc,bogdandrutu/grpc,kpayson64/grpc,andrewpollock/grpc,chrisdunelm/grpc,infinit/grpc,ncteisen/grpc,msiedlarek/grpc,deepaklukose/grpc,7anner/grpc,malexzx/grpc,VcamX/grpc,firebase/grpc,yongni/grpc,ncteisen/grpc,y-zeng/grpc,nicolasnoble/grpc,dklempner/grpc,kpayson64/grpc,mehrdada/grpc,msiedlarek/grpc,dgquintas/grpc,ipylypiv/grpc,sreecha/grpc,grpc/grpc,kriswuollett/grpc,sreecha/grpc,ncteisen/grpc,ncteisen/grpc,VcamX/grpc,daniel-j-born/grpc,malexzx/grpc,perumaalgoog/grpc,kskalski/grpc,ctiller/grpc,jcanizales/grpc,thunderboltsid/grpc,sreecha/grpc,kpayson64/grpc,nicolasnoble/grpc,royalharsh/grpc,hstefan/grpc,tamihiro/grpc,msiedlarek/grpc,dklempner/grpc,Crevil/grpc,ctiller/grpc,soltanmm/grpc,jtattermusch/grpc,mehrdada/grpc,rjshade/grpc,chrisdunelm/grpc,arkmaxim/grpc,soltanmm/grpc,soltanmm-google/grpc,kumaralokgithub/grpc,vjpai/grpc,zhimingxie/grpc,andrewpollock/grpc,quizlet/grpc,thunderboltsid/grpc,leifurhauks/grpc,yang-g/grpc,simonkuang/grpc,matt-kwong/grpc,goldenbull/grpc,kpayson64/grpc,nicolasnoble/grpc,pszemus/grpc,jtattermusch/grpc,muxi/grpc,msmania/grpc,simonkuang/grpc,fuchsia-mirror/third_party-grpc,royalharsh/grpc,deepaklukose/grpc,muxi/grpc,goldenbull/grpc,fuchsia-mirror/third_party-grpc,chrisdunelm/grpc,hstefan/grpc,deepaklukose/grpc,yongni/grpc,grani/grpc,greasypizza/grpc,arkmaxim/grpc,thunderboltsid/grpc,dgquintas/grpc,vsco/grpc,goldenbull/grpc,ncteisen/grpc,grani/grpc,firebase/grpc,deepaklukose/grpc,ppietrasa/grpc,soltanmm-google/grpc,firebase/grpc,ipylypiv/grpc,vjpai/grpc,Vizerai/grpc,firebase/grpc,baylabs/grpc,kpayson64/grpc,tamihiro/grpc,muxi/grpc,yugui/grpc,bogdandrutu/grpc,stanley-cheung/grpc,ppietrasa/grpc,greasypizza/grpc,VcamX/grpc,deepaklukose/grpc,Vizerai/grpc,royalharsh/grpc,msiedlarek/grpc,jtattermusch/grpc,fuchsia-mirror/third_party-grpc,msmania/grpc,donnadionne/grpc,ipylypiv/grpc,ctiller/grpc,fuchsia-mirror/third_party-grpc,thinkerou/grpc,deepaklukose/grpc,malexzx/grpc,y-zeng/grpc,tamihiro/grpc,ppietrasa/grpc,ejona86/grpc,a11r/grpc,hstefan/grpc,ipylypiv/grpc,baylabs/grpc,apolcyn/grpc,jboeuf/grpc,yongni/grpc,vjpai/grpc,murgatroid99/grpc,grpc/grpc,mehrdada/grpc,MakMukhi/grpc,daniel-j-born/grpc,grani/grpc,geffzhang/grpc,msmania/grpc,ppietrasa/grpc,miselin/grpc,simonkuang/grpc,daniel-j-born/grpc,ncteisen/grpc,adelez/grpc |
08e75e4b73c4daf9bad51b821b7ce824cd9bd6f4 | proj2/peter.c | proj2/peter.c | #include <stdio.h>
#include <stdlib.h>
#include <pcap.h>
int main()
{
struct pcap_if *found_devices;
char errbuf[PCAP_ERRBUF_SIZE];
int success = 0;
success = pcap_findalldevs(&found_devices, errbuf);
if( success < 0 )
{
printf("something went wrong. can't open device\n");
}
if( found_devices != NULL )
{
while( found_devices != NULL )
{
printf("%s\n", found_devices->name);
found_devices = found_devices->next;
}
}
return 0;
}
| Add code provided in class | Add code provided in class
It's very similar to p1a, but being added here for posterity.
| C | bsd-3-clause | sjbarag/ECE-C433,sjbarag/ECE-C433,sjbarag/ECE-C433 |
|
363f031f11c3b704a77e65535915297fdcf3d669 | src/fake-lock-screen-pattern.h | src/fake-lock-screen-pattern.h | #ifndef _FAKE_LOCK_SCREEN_PATTERN_H_
#define _FAKE_LOCK_SCREEN_PATTERN_H_
#include <gtk/gtk.h>
#if !GTK_CHECK_VERSION(3, 0, 0)
typedef struct {
gdouble red;
gdouble green;
gdouble blue;
gdouble alpha;
} GdkRGBA;
#endif
#endif
| #ifndef _FAKE_LOCK_SCREEN_PATTERN_H_
#define _FAKE_LOCK_SCREEN_PATTERN_H_
#include <gtk/gtk.h>
#if !GTK_CHECK_VERSION(3, 0, 0)
typedef struct {
gdouble red;
gdouble green;
gdouble blue;
gdouble alpha;
} GdkRGBA;
#endif
void flsp_draw_circle(cairo_t *context,
gint x, gint y, gint radius,
GdkRGBA circle, GdkRGBA border);
#endif
| Add function to draw primitive circle | Add function to draw primitive circle
| C | mit | kenhys/fake-lock-screen-pattern,kenhys/fake-lock-screen-pattern |
e8b3bd4906995c5762395384faa594df2d812fa1 | ext/ScreenShot/ScreenShot.h | ext/ScreenShot/ScreenShot.h | #ifndef _IRR_EXT_SCREEN_SHOT_INCLUDED_
#define _IRR_EXT_SCREEN_SHOT_INCLUDED_
#include "irrlicht.h"
#include "../source/Irrlicht/COpenGLBuffer.h"
#include "../source/Irrlicht/COpenGLExtensionHandler.h"
namespace irr
{
namespace ext
{
namespace ScreenShot
{
video::IDriverFence* createScreenShot(video::IDriver* driver, video::ITexture* source, video::IGPUBuffer* destination, uint32_t sourceMipLevel=0u, size_t destOffset=0ull, bool implicitflush=true)
{
// will change this, https://github.com/buildaworldnet/IrrlichtBAW/issues/148
if (isBlockCompressionFormat(source->getColorFormat()))
return nullptr;
auto gltex = dynamic_cast<video::COpenGLTexture*>(source);
GLenum colorformat=GL_INVALID_ENUM, type=GL_INVALID_ENUM;
video::COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(source->getColorFormat(),colorformat,type);
video::COpenGLExtensionHandler::extGlBindBuffer(GL_PIXEL_PACK_BUFFER, static_cast<video::COpenGLBuffer*>(destination)->getOpenGLName());
video::COpenGLExtensionHandler::extGlGetTextureImage( gltex->getOpenGLName(),gltex->getOpenGLTextureType(),sourceMipLevel,
colorformat,type,source->getPitch()*source->getSize()[1],reinterpret_cast<void*>(destOffset));
video::COpenGLExtensionHandler::extGlBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
return driver->placeFence(implicitflush);
}
} // namespace ScreenShot
} // namespace ext
} // namespace irr
#endif // _IRR_EXT_SCREEN_SHOT_INCLUDED_
| Add a screenshot by texture download (not from framebuffer) | Add a screenshot by texture download (not from framebuffer)
| C | apache-2.0 | buildaworldnet/IrrlichtBAW,buildaworldnet/IrrlichtBAW,buildaworldnet/IrrlichtBAW |
|
855bb402a5e8492e2ffdee1d5c402f23bfe53687 | include/HubFramework/HubFramework.h | include/HubFramework/HubFramework.h | /// Umbrella header for the Hub Framework
#import "HUBManager.h"
#import "HUBConnectivityStateResolver.h"
// JSON
#import "HUBJSONSchema.h"
#import "HUBViewModelJSONSchema.h"
#import "HUBComponentModelJSONSchema.h"
#import "HUBComponentImageDataJSONSchema.h"
#import "HUBJSONSchemaRegistry.h"
#import "HUBJSONPath.h"
#import "HUBMutableJSONPath.h"
// Feature
#import "HUBFeatureConfiguration.h"
#import "HUBFeatureRegistry.h"
// Content
#import "HUBContentProviderFactory.h"
#import "HUBRemoteContentProvider.h"
#import "HUBLocalContentProvider.h"
// View
#import "HUBViewModel.h"
#import "HUBViewModelLoader.h"
#import "HUBViewModelLoaderFactory.h"
#import "HUBViewModelBuilder.h"
#import "HUBViewURIQualifier.h"
#import "HUBViewControllerFactory.h"
// Components
#import "HUBComponent.h"
#import "HUBComponentFactory.h"
#import "HUBComponentIdentifier.h"
#import "HUBComponentModel.h"
#import "HUBComponentModelBuilder.h"
#import "HUBComponentImageData.h"
#import "HUBComponentImageDataBuilder.h"
#import "HUBComponentRegistry.h"
| /// Umbrella header for the Hub Framework
#import "HUBManager.h"
#import "HUBConnectivityStateResolver.h"
// JSON
#import "HUBJSONSchema.h"
#import "HUBViewModelJSONSchema.h"
#import "HUBComponentModelJSONSchema.h"
#import "HUBComponentImageDataJSONSchema.h"
#import "HUBJSONSchemaRegistry.h"
#import "HUBJSONPath.h"
#import "HUBMutableJSONPath.h"
// Feature
#import "HUBFeatureConfiguration.h"
#import "HUBFeatureRegistry.h"
// Content
#import "HUBContentProviderFactory.h"
#import "HUBRemoteContentProvider.h"
#import "HUBLocalContentProvider.h"
// View
#import "HUBViewModel.h"
#import "HUBViewModelLoader.h"
#import "HUBViewModelLoaderFactory.h"
#import "HUBViewModelBuilder.h"
#import "HUBViewURIQualifier.h"
#import "HUBViewControllerFactory.h"
// Components
#import "HUBComponent.h"
#import "HUBComponentFactory.h"
#import "HUBComponentModel.h"
#import "HUBComponentModelBuilder.h"
#import "HUBComponentImageData.h"
#import "HUBComponentImageDataBuilder.h"
#import "HUBComponentRegistry.h"
| Remove `HUBComponentIdentifier` import from umbrella header | Remove `HUBComponentIdentifier` import from umbrella header | C | apache-2.0 | spotify/HubFramework,spotify/HubFramework,spotify/HubFramework,spotify/HubFramework |
3730accd147663026f892a707166c0c001cabed0 | snippets/TMAX.c | snippets/TMAX.c | #! /usr/bin/tcc -run
// demonstate testmin testmax consistency with malloc
#include <string.h> // memcpy
#include <stdio.h> // printf
#include <stdlib.h> // malloc
#include <assert.h> // assert
typedef struct {ssize_t size; char *row; int count;} slot;
slot line;
slot *text;
int main(void)
{
leng = 10; int numb;
text = malloc(leng*sizeof(slot));
int textmax = (int) (text + leng - 1);
int textmin = (int) (text + 0);
line.row = NULL;
line.size = 0;
int i; for(i = 0; i < leng+1; i++) //deliberate overrun
{
printf("%d text = %p\n",i,text+i);
numb = (int) (text+i);
printf("%d numb = %x\n",i,numb);
assert(textmin <= numb); assert(textmax >= numb);
*(text+i) = line;
}
printf("test run ending\n");
return 0;
}
| #! /usr/bin/tcc -run
#include <string.h> // memcpy
#include <stdio.h> // printf
#include <stdlib.h> // malloc
#include <assert.h> // assert
#define textbound texndx = (int) (text + iy); \
assert(textmin <= texndx); \
assert(textmax >= texndx);
typedef struct {ssize_t size; char *row; int count;} slot;
slot line;
slot *text;
int main(void)
{
int leng = 10;
text = malloc(leng*sizeof(slot));
int textmax = (int) (text + leng - 1);
int textmin = (int) (text + 0);
line.row = NULL;
line.size = 0;
int iy; for(iy = 0; iy < leng+1; iy++) //deliberate iy overrun
{
printf("%d text = %p\n",iy,text+iy);
int texndx; textbound;
text[iy] = line;
}
printf("test run ending\n");
return 0;
}
| Add definition for testing bounds on array text | Add definition for testing bounds on array text
| C | bsd-2-clause | eingaeph/pip.imbue.hood,eingaeph/pip.imbue.hood |
ac21a316a0e0179d2d2b52d81d417430a82992ca | dependencies/stdafx/stdafx.h | dependencies/stdafx/stdafx.h | #include <Ogre.h>
#include <OgreMeshFileFormat.h>
#include <OgreOptimisedUtil.h>
#include <OgrePredefinedControllers.h>
#ifdef WIN32
#include <OgreD3D9RenderSystem.h>
#include <OgreD3D9HLSLProgram.h>
#endif
#include <OgreOctreePlugin.h>
#include <OgreOctreeSceneManager.h>
#include <OgreCgPlugin.h>
#include <OgreCgProgram.h>
| #include <Ogre.h>
#include <OgreDepthBuffer.h>
#include <OgreMeshFileFormat.h>
#include <OgreOptimisedUtil.h>
#include <OgrePredefinedControllers.h>
#ifdef WIN32
#include <OgreD3D9RenderSystem.h>
#include <OgreD3D9HLSLProgram.h>
#endif
#include <OgreOctreePlugin.h>
#include <OgreOctreeSceneManager.h>
#include <OgreCgPlugin.h>
#include <OgreCgProgram.h>
| Add Depthbuffer to precompiled header | Add Depthbuffer to precompiled header
| C | mit | grit-engine/grit-engine,sparkprime/grit-engine,sparkprime/grit-engine,sparkprime/grit-engine,grit-engine/grit-engine,grit-engine/grit-engine,sparkprime/grit-engine,grit-engine/grit-engine |
cd15a3b8e5975c8ddc5928022fce4696adce5e8c | Pods/Expecta/src/matchers/EXPMatchers+equal.h | Pods/Expecta/src/matchers/EXPMatchers+equal.h | #import "Expecta.h"
EXPMatcherInterface(_equal, (id expected));
EXPMatcherInterface(equal, (id expected)); // to aid code completion
#define equal(expected) _equal(EXPObjectify((expected)))
| #import "Expecta.h"
EXPMatcherInterface(_equal, (id expected));
EXPMatcherInterface(equal, (id expected)); // to aid code completion
#define equal(...) _equal(EXPObjectify((__VA_ARGS__)))
| Change expecta equal() to accept any amount of argument | Change expecta equal() to accept any amount of argument
This helps with array literals
| C | mit | frenetisch-applaudierend/mocka,frenetisch-applaudierend/mocka |
6a8cbb53dad28508f0fbb893ce37defbbec11a49 | src/bin/e_log.c | src/bin/e_log.c | #include "e.h"
EINTERN int e_log_dom = -1;
EINTERN int
e_log_init(void)
{
e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
return e_log_dom != -1;
}
EINTERN int
e_log_shutdown(void)
{
eina_log_domain_unregister(e_log_dom);
e_log_dom = -1;
return 0;
}
| #include "e.h"
EINTERN int e_log_dom = -1;
static const char *_names[] = {
"CRI",
"ERR",
"WRN",
"INF",
"DBG",
};
static void
_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, void *data EINA_UNUSED, va_list args)
{
const char *color;
color = eina_log_level_color_get(level);
fprintf(stdout,
"%s%s<" EINA_COLOR_RESET "%s%s>" EINA_COLOR_RESET "%s:%d" EINA_COLOR_RESET " ",
color, _names[level > EINA_LOG_LEVEL_DBG ? EINA_LOG_LEVEL_DBG : level],
d->domain_str, color, file, line);
vfprintf(stdout, fmt, args);
putc('\n', stdout);
}
EINTERN int
e_log_init(void)
{
e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
eina_log_print_cb_set(_e_log_cb, NULL);
return e_log_dom != -1;
}
EINTERN int
e_log_shutdown(void)
{
eina_log_domain_unregister(e_log_dom);
e_log_dom = -1;
return 0;
}
| Revert "e logs - the custom e log func breaks eina backtraces, so don't use it" | Revert "e logs - the custom e log func breaks eina backtraces, so don't use it"
This reverts commit 2df04042269f3b5604c719844eac372fa5fcddd2.
let's not do this in all cases
| C | bsd-2-clause | tasn/enlightenment,rvandegrift/e,rvandegrift/e,rvandegrift/e,tasn/enlightenment,tasn/enlightenment |
ae0b6ad71ed495ac6fba25c8b8feb25828e756a0 | rest/rest-main.c | rest/rest-main.c | #include "rest-private.h"
guint rest_debug_flags = 0;
/*
* "Private" function used to set debugging flags based on environment
* variables. Called upon entry into all public functions.
*/
void
_rest_setup_debugging (void)
{
const gchar *tmp;
gchar **parts;
gint i = 0;
static gboolean setup_done = FALSE;
if (setup_done)
return;
tmp = g_getenv ("REST_DEBUG");
if (tmp)
{
parts = g_strsplit (tmp, ",", -1);
for (i = 0; parts[i] != NULL; i++)
{
if (g_str_equal (tmp, "xml-parser"))
{
rest_debug_flags |= REST_DEBUG_XML_PARSER;
} else if (g_str_equal (tmp, "proxy")) {
rest_debug_flags |= REST_DEBUG_PROXY;
} else if (g_str_equal (tmp, "all")) {
rest_debug_flags |= REST_DEBUG_ALL;
}
}
g_strfreev (parts);
}
setup_done = TRUE;
}
| #include "rest-private.h"
guint rest_debug_flags = 0;
/*
* "Private" function used to set debugging flags based on environment
* variables. Called upon entry into all public functions.
*/
void
_rest_setup_debugging (void)
{
static gboolean setup_done = FALSE;
static const GDebugKey keys[] = {
{ "xml-parser", REST_DEBUG_XML_PARSER },
{ "proxy", REST_DEBUG_PROXY }
};
if (G_LIKELY (setup_done))
return;
rest_debug_flags = g_parse_debug_string (g_getenv ("REST_DEBUG"),
keys, G_N_ELEMENTS (keys));
setup_done = TRUE;
}
| Use g_parse_debug_string instead of manually parsing | Use g_parse_debug_string instead of manually parsing
| C | lgpl-2.1 | GNOME/librest,Distrotech/librest,ThomasBollmeier/librest-oauth-proxy,GNOME/librest,Distrotech/librest,GNOME/librest,ThomasBollmeier/librest-oauth-proxy |
4026b3ed5ed0c6af1312ac58a2ec578637d9175a | test/Driver/mno-global-merge.c | test/Driver/mno-global-merge.c | // RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
// RUN: %clang -target arm64-apple-ios7 \
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
// CHECK-NGM: "-mno-global-merge"
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
// RUN: %clang -target arm64-apple-ios7 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
// CHECK-GM-NOT: "-mglobal-merge"
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mno-global-merge -c %s
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mglobal-merge -c %s
| // RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
// RUN: %clang -target arm64-apple-ios7 \
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
// CHECK-NGM: "-mno-global-merge"
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
// RUN: %clang -target arm64-apple-ios7 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
// CHECK-GM-NOT: "-mglobal-merge"
| Revert new test from 213993. | Revert new test from 213993.
It requires an arm backend and also writes output in the test directory.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@213998 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,llvm-mirror/clang,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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang |
b427c3a85360d7e1113b4157f1cb745b789863b0 | test/wasm/soft/float/fixtfdi.c | test/wasm/soft/float/fixtfdi.c | #include "src/math/reinterpret.h"
#include <math.h>
#include <stdint.h>
#include <assert.h>
int64_t __fixtfdi(long double);
int main(void)
{
const __int128 delta = (__int128)0x17E93193 << 64 | 0xC0605887B0E6B634;
assert(__fixtfdi(INT64_MIN - 0.7L) == INT64_MIN);
for (__int128 i = reinterpret(__int128, 0.9L); i < reinterpret(__int128, 0x1p63L); i += delta) {
long double x = reinterpret(long double, i);
long double y = truncl(x);
assert(__fixtfdi(x) == y);
assert(__fixtfdi(-x) == -y);
}
}
| Test long douoble -> int64_t | Test long douoble -> int64_t
| C | mit | jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic |
|
009aeab78a78eb666321eea22fb515f718142165 | Sub-Terra/include/World.h | Sub-Terra/include/World.h | #pragma once
#include <boost/unordered_map.hpp>
#include "System.h"
#include "OpenSimplexNoise.h"
enum class ChunkStatus {
Generating,
Alive,
Dying,
Dead
};
typedef std::tuple<int64_t, int64_t, int64_t> ChunkKeyType;
typedef std::tuple<ChunkStatus, IDType> ChunkContainerType;
typedef boost::unordered_map<ChunkKeyType, ChunkContainerType> ChunksType;
class World : public System {
private:
const uint8_t viewDistance = 5;
const Point3 blockSize = Point3(1.0f);
const glm::ivec3 chunkSize;
OpenSimplexNoise noise = OpenSimplexNoise(std::random_device()());
Atomic<ChunksType> chunks;
protected:
void Init() override final;
void Update(DeltaTicks &) override final;
public:
static bool IsSupported() { return true; }
World(Polar *engine, const unsigned char chunkWidth, const unsigned char chunkHeight, const unsigned char chunkDepth)
: System(engine), chunkSize(chunkWidth, chunkHeight, chunkDepth) {}
~World();
std::vector<bool> GenerateChunk(const Point3 &&) const;
bool GenerateBlock(const Point3 &&) const;
};
| #pragma once
#include <boost/unordered_map.hpp>
#include "System.h"
#include "OpenSimplexNoise.h"
enum class ChunkStatus {
Generating,
Alive,
Dying,
Dead
};
typedef std::tuple<int64_t, int64_t, int64_t> ChunkKeyType;
typedef std::tuple<ChunkStatus, IDType> ChunkContainerType;
typedef boost::unordered_map<ChunkKeyType, ChunkContainerType> ChunksType;
class World : public System {
private:
const uint8_t viewDistance = 3;
const Point3 blockSize = Point3(1.0f);
const glm::ivec3 chunkSize;
OpenSimplexNoise noise = OpenSimplexNoise(std::random_device()());
Atomic<ChunksType> chunks;
protected:
void Init() override final;
void Update(DeltaTicks &) override final;
public:
static bool IsSupported() { return true; }
World(Polar *engine, const unsigned char chunkWidth, const unsigned char chunkHeight, const unsigned char chunkDepth)
: System(engine), chunkSize(chunkWidth, chunkHeight, chunkDepth) {}
~World();
std::vector<bool> GenerateChunk(const Point3 &&) const;
bool GenerateBlock(const Point3 &&) const;
};
| Change world view distance to 3 | Change world view distance to 3
| C | mpl-2.0 | shockkolate/polar4,shockkolate/polar4,shockkolate/polar4,polar-engine/polar,shockkolate/polar4,polar-engine/polar |
ef8b28e9459e729b7bd8c826d204621b039611fa | test/Analysis/array-struct.c | test/Analysis/array-struct.c | // RUN: clang -checker-simple -verify %s
struct s {};
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
q = &d;
}
| Add test case for array and struct variable lvalue evaluation. | Add test case for array and struct variable lvalue evaluation.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@57670 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/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,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang |
|
3e6e67f631568af99a38f327c9d1a3da6cb1b9da | test/CodeGen/mmintrin-test.c | test/CodeGen/mmintrin-test.c | // RUN: clang -triple i386-apple-darwin9 -emit-llvm -o %t %s &&
// RUN: grep define %t | count 1 &&
// RUN: clang -triple i386-apple-darwin9 -g -emit-llvm -o %t %s &&
// RUN: grep define %t | count 1
#include <mmintrin.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int array[16] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 };
__m64 *p = (__m64 *)array;
__m64 accum = _mm_setzero_si64();
for (int i=0; i<8; ++i)
accum = _mm_add_pi32(p[i], accum);
__m64 accum2 = _mm_unpackhi_pi32(accum, accum);
accum = _mm_add_pi32(accum, accum2);
int result = _mm_cvtsi64_si32(accum);
_mm_empty();
printf("%d\n", result );
return 0;
}
| Add test case for using mmintrin (and making sure that inlining is working with and without debug info). | Add test case for using mmintrin (and making sure that inlining is
working with and without debug info).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@60960 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,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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang |
|
e66fb4cb5e5c3ed80e5e874cc06c110482a57ab3 | ionCore/ionStandardLibrary.h | ionCore/ionStandardLibrary.h |
#pragma once
#include "ionTypes.h"
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <sstream>
using std::move;
using std::ifstream;
template <typename T, typename U>
U * ConditionalMapAccess(map<T, U *> & Map, T const Key)
{
auto Iterator = Map.find(Key);
if (Iterator != Map.end())
return Iterator->second;
return 0;
}
|
#pragma once
#include "ionTypes.h"
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <sstream>
using std::move;
using std::ifstream;
template <typename T, typename U>
U * ConditionalMapAccess(map<T, U *> & Map, T const Key)
{
auto Iterator = Map.find(Key);
if (Iterator != Map.end())
return Iterator->second;
return 0;
}
class File
{
public:
static bool Exists(string const & FileName)
{
ifstream ifile(FileName);
return ifile.good();
}
static string && ReadAsString(string const & FileName)
{
std::ifstream t(FileName);
std::string str;
t.seekg(0, std::ios::end);
str.reserve((uint) t.tellg());
t.seekg(0, std::ios::beg);
str.assign((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
return move(str);
}
};
| Add some file utility functions | Add some file utility functions
--HG--
branch : SceneOverhaul
| C | mit | iondune/ionEngine,iondune/ionEngine |
ad74ebb3ae7f3dee129f0ccce11100e3fcef1d4c | bin/check_it.c | bin/check_it.c | #include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
int main(int argc, char** argv) {
struct passwd *passwd = getpwuid(getuid());
int errno = setreuid(geteuid(), geteuid());
// errno = execle("/usr/bin/id", (char *) 0, envp);
if (errno == 0 && passwd != 0) {
// CHECKIT_USER will contain the name of the user that invoked us.
char user_evar[100];
snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name);
// Use a nice clean PATH.
char * envp[] = { "PATH=/bin:/usr/bin", user_evar, (char *) 0 };
// Do it!
errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp);
}
printf("An error occured %d\n", errno);
return errno;
}
| #include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
int main(int argc, char** argv) {
struct passwd *passwd = getpwuid(getuid());
int errno = setreuid(geteuid(), geteuid());
// errno = execle("/usr/bin/id", (char *) 0, envp);
if (errno == 0 && passwd != 0) {
// CHECKIT_USER will contain the name of the user that invoked us.
char user_evar[100];
snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name);
// Use a nice clean PATH.
char * envp[] = {
"PATH=/bin:/usr/bin"
, "HOME=/home2/ling572_00"
, "JAVA_HOME=/usr/java/latest"
, "JAVA_OPTS=-Xmx300m -Xms140m"
, user_evar
, (char *) 0 };
// Do it!
errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp);
}
printf("An error occured %d\n", errno);
return errno;
}
| Reduce Java VM max heap space. | Reduce Java VM max heap space.
| C | agpl-3.0 | jimwhite/CheckIt,jimwhite/CheckIt,jimwhite/CheckIt,jimwhite/CheckIt |
1edbd62cac51376384ca2786be85fbbe0cbe7dbb | src/interfaces/odbc/md5.h | src/interfaces/odbc/md5.h | /* File: connection.h
*
* Description: See "connection.c"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
#ifndef __BEOS__ /* this shouldn't be required, but is is! */
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* __BEOS__ */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
| /* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
#ifndef __BEOS__ /* this shouldn't be required, but is is! */
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* __BEOS__ */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
| Fix comment at top of file to match file name. | Fix comment at top of file to match file name.
| C | apache-2.0 | lisakowen/gpdb,janebeckman/gpdb,xuegang/gpdb,Quikling/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,rubikloud/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,arcivanov/postgres-xl,tangp3/gpdb,greenplum-db/gpdb,rubikloud/gpdb,oberstet/postgres-xl,ahachete/gpdb,Quikling/gpdb,Postgres-XL/Postgres-XL,tangp3/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,royc1/gpdb,CraigHarris/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,rubikloud/gpdb,tangp3/gpdb,yuanzhao/gpdb,arcivanov/postgres-xl,greenplum-db/gpdb,CraigHarris/gpdb,oberstet/postgres-xl,adam8157/gpdb,tpostgres-projects/tPostgres,50wu/gpdb,CraigHarris/gpdb,tangp3/gpdb,ovr/postgres-xl,postmind-net/postgres-xl,ahachete/gpdb,zaksoup/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,lisakowen/gpdb,tangp3/gpdb,chrishajas/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,yazun/postgres-xl,foyzur/gpdb,rvs/gpdb,ahachete/gpdb,ovr/postgres-xl,lintzc/gpdb,yuanzhao/gpdb,janebeckman/gpdb,snaga/postgres-xl,lintzc/gpdb,ashwinstar/gpdb,chrishajas/gpdb,xinzweb/gpdb,xinzweb/gpdb,edespino/gpdb,0x0FFF/gpdb,rubikloud/gpdb,xuegang/gpdb,Postgres-XL/Postgres-XL,kaknikhil/gpdb,yuanzhao/gpdb,yazun/postgres-xl,oberstet/postgres-xl,rvs/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,xuegang/gpdb,tangp3/gpdb,techdragon/Postgres-XL,adam8157/gpdb,chrishajas/gpdb,ovr/postgres-xl,randomtask1155/gpdb,ashwinstar/gpdb,Chibin/gpdb,rubikloud/gpdb,xinzweb/gpdb,xinzweb/gpdb,atris/gpdb,yazun/postgres-xl,zeroae/postgres-xl,zeroae/postgres-xl,50wu/gpdb,0x0FFF/gpdb,adam8157/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,royc1/gpdb,Postgres-XL/Postgres-XL,royc1/gpdb,janebeckman/gpdb,royc1/gpdb,foyzur/gpdb,foyzur/gpdb,zeroae/postgres-xl,yuanzhao/gpdb,techdragon/Postgres-XL,arcivanov/postgres-xl,xinzweb/gpdb,ashwinstar/gpdb,Quikling/gpdb,greenplum-db/gpdb,Chibin/gpdb,lintzc/gpdb,randomtask1155/gpdb,zaksoup/gpdb,xuegang/gpdb,kmjungersen/PostgresXL,randomtask1155/gpdb,randomtask1155/gpdb,Quikling/gpdb,zaksoup/gpdb,50wu/gpdb,lintzc/gpdb,kaknikhil/gpdb,adam8157/gpdb,ahachete/gpdb,50wu/gpdb,xuegang/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,tpostgres-projects/tPostgres,kaknikhil/gpdb,greenplum-db/gpdb,postmind-net/postgres-xl,edespino/gpdb,snaga/postgres-xl,ashwinstar/gpdb,lpetrov-pivotal/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,lisakowen/gpdb,arcivanov/postgres-xl,adam8157/gpdb,kmjungersen/PostgresXL,zeroae/postgres-xl,50wu/gpdb,kmjungersen/PostgresXL,cjcjameson/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,chrishajas/gpdb,janebeckman/gpdb,cjcjameson/gpdb,50wu/gpdb,royc1/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,janebeckman/gpdb,Chibin/gpdb,jmcatamney/gpdb,edespino/gpdb,oberstet/postgres-xl,atris/gpdb,atris/gpdb,jmcatamney/gpdb,Quikling/gpdb,Quikling/gpdb,edespino/gpdb,0x0FFF/gpdb,lintzc/gpdb,greenplum-db/gpdb,janebeckman/gpdb,kaknikhil/gpdb,rvs/gpdb,CraigHarris/gpdb,arcivanov/postgres-xl,ahachete/gpdb,lpetrov-pivotal/gpdb,cjcjameson/gpdb,rvs/gpdb,zeroae/postgres-xl,foyzur/gpdb,Chibin/gpdb,adam8157/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,foyzur/gpdb,kaknikhil/gpdb,zaksoup/gpdb,ovr/postgres-xl,edespino/gpdb,royc1/gpdb,randomtask1155/gpdb,edespino/gpdb,lintzc/gpdb,foyzur/gpdb,tpostgres-projects/tPostgres,kmjungersen/PostgresXL,Chibin/gpdb,xuegang/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,rvs/gpdb,edespino/gpdb,Chibin/gpdb,xuegang/gpdb,rvs/gpdb,tangp3/gpdb,lisakowen/gpdb,janebeckman/gpdb,Quikling/gpdb,50wu/gpdb,cjcjameson/gpdb,edespino/gpdb,ovr/postgres-xl,janebeckman/gpdb,snaga/postgres-xl,pavanvd/postgres-xl,pavanvd/postgres-xl,CraigHarris/gpdb,CraigHarris/gpdb,janebeckman/gpdb,lisakowen/gpdb,lintzc/gpdb,chrishajas/gpdb,chrishajas/gpdb,0x0FFF/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,ahachete/gpdb,CraigHarris/gpdb,tpostgres-projects/tPostgres,jmcatamney/gpdb,zaksoup/gpdb,postmind-net/postgres-xl,yazun/postgres-xl,0x0FFF/gpdb,lpetrov-pivotal/gpdb,rubikloud/gpdb,xinzweb/gpdb,0x0FFF/gpdb,atris/gpdb,foyzur/gpdb,tangp3/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,royc1/gpdb,rvs/gpdb,Quikling/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,edespino/gpdb,yuanzhao/gpdb,xinzweb/gpdb,ahachete/gpdb,rubikloud/gpdb,adam8157/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,rvs/gpdb,chrishajas/gpdb,lisakowen/gpdb,rubikloud/gpdb,lintzc/gpdb,atris/gpdb,rvs/gpdb,zaksoup/gpdb,xuegang/gpdb,foyzur/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,rvs/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,cjcjameson/gpdb,Chibin/gpdb,yazun/postgres-xl,lintzc/gpdb,Postgres-XL/Postgres-XL,xuegang/gpdb,adam8157/gpdb,royc1/gpdb,ahachete/gpdb,lisakowen/gpdb,janebeckman/gpdb,yuanzhao/gpdb,Quikling/gpdb,Chibin/gpdb,jmcatamney/gpdb,atris/gpdb,lisakowen/gpdb,tpostgres-projects/tPostgres,pavanvd/postgres-xl,greenplum-db/gpdb,xinzweb/gpdb,kmjungersen/PostgresXL,pavanvd/postgres-xl,atris/gpdb,zaksoup/gpdb,cjcjameson/gpdb,arcivanov/postgres-xl,oberstet/postgres-xl,Quikling/gpdb,edespino/gpdb,0x0FFF/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,CraigHarris/gpdb |
bf5fc320c8d772d44768413602dc82fd197552ea | include/clang/Driver/HostInfo.h | include/clang/Driver/HostInfo.h | //===--- HostInfo.h - Host specific information -----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef CLANG_DRIVER_HOSTINFO,_H_
#define CLANG_DRIVER_HOSTINFO_H_
#include <string>
namespace clang {
namespace driver {
class ArgList;
class ToolChain;
/// HostInfo - Config information about a particular host which may
/// interact with driver behavior.
///
/// The host information is used for controlling the parts of the
/// driver which interact with the platform the driver is ostensibly
/// being run from. For testing purposes, the HostInfo used by the
/// driver may differ from the actual host.
class HostInfo {
std::string Arch, Platform, OS;
protected:
HostInfo(const char *Arch, const char *Platform, const char *OS);
public:
virtual ~HostInfo();
/// useDriverDriver - Whether the driver should act as a driver
/// driver for this host and support -arch, -Xarch, etc.
virtual bool useDriverDriver() const = 0;
/// getToolChain - Construct the toolchain to use for this host.
///
/// \param Args - The argument list, which may be used to alter the
/// default toolchain, for example in the presence of -m32 or -m64.
///
/// \param ArchName - The architecture to return a toolchain for, or
/// 0 if unspecified. This will only be non-zero for hosts which
/// support a driver driver.
virtual ToolChain *getToolChain(const ArgList &Args,
const char *ArchName) const = 0;
};
/// DarwinHostInfo - Darwin host information implementation.
class DarwinHostInfo : public HostInfo {
/// Darwin version of host.
unsigned DarwinVersion[3];
/// GCC version to use on this host.
unsigned GCCVersion[3];
public:
DarwinHostInfo(const char *Arch, const char *Platform, const char *OS);
virtual bool useDriverDriver() const;
virtual ToolChain *getToolChain(const ArgList &Args,
const char *ArchName) const;
};
/// UnknownHostInfo - Generic host information to use for unknown
/// hosts.
class UnknownHostInfo : public HostInfo {
public:
UnknownHostInfo(const char *Arch, const char *Platform, const char *OS);
virtual bool useDriverDriver() const;
virtual ToolChain *getToolChain(const ArgList &Args,
const char *ArchName) const;
};
} // end namespace driver
} // end namespace clang
#endif
| Add host info (add new files). | Driver: Add host info (add new files).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@66604 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang |
|
c300c7ef4df651096cb83a370f0bbfccd516f9b6 | solutions/uri/1795/1795.c | solutions/uri/1795/1795.c | #include <stdio.h>
#include <string.h>
unsigned long long memo[1000];
unsigned long long calculate_sum(unsigned long long line) {
if (memo[line] != 0) {
return memo[line];
}
if (line == 0) {
memo[line] = 1;
} else {
memo[line] = calculate_sum(line - 1) * 3;
}
return memo[line];
}
int main() {
unsigned long long line;
memset(memo, 0, sizeof(memo));
while(scanf("%llu", &line) != EOF) {
printf("%llu\n", calculate_sum(line));
}
return 0;
}
| Solve Trinomial Triangle in c | Solve Trinomial Triangle 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 |
|
acce10551c7483b3fc03ec70ad4982c8d975b729 | ObjectiveRocks/ObjectiveRocks.h | ObjectiveRocks/ObjectiveRocks.h | //
// ObjectiveRocks.h
// ObjectiveRocks
//
// Created by Iska on 20/11/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import "RocksDB.h"
#import "RocksDBColumnFamily.h"
#import "RocksDBOptions.h"
#import "RocksDBReadOptions.h"
#import "RocksDBWriteOptions.h"
#import "RocksDBWriteBatch.h"
#import "RocksDBIterator.h"
#import "RocksDBSnapshot.h"
#import "RocksDBComparator.h"
#import "RocksDBMergeOperator.h"
#import "RocksDBBackupEngine.h"
#import "RocksDBTypes.h"
#import "RocksDBError.h"
| //
// ObjectiveRocks.h
// ObjectiveRocks
//
// Created by Iska on 20/11/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import "RocksDB.h"
#import "RocksDBColumnFamily.h"
#import "RocksDBOptions.h"
#import "RocksDBReadOptions.h"
#import "RocksDBWriteOptions.h"
#import "RocksDBWriteBatch.h"
#import "RocksDBIterator.h"
#import "RocksDBSnapshot.h"
#import "RocksDBComparator.h"
#import "RocksDBMergeOperator.h"
#import "RocksDBBackupEngine.h"
#import "RocksDBBackupInfo.h"
#import "RocksDBTypes.h"
#import "RocksDBError.h"
| Add BackupInfo class to public include header | Add BackupInfo class to public include header
| C | mit | iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks |
fae9876b444ebf71c67626d2d3d5f9a11ab7b664 | common-block.h | common-block.h | // See copyright notice in Copying.
#ifndef COMMON_BLOCK_H
#define COMMON_BLOCK_H
enum {
FLAG_DEFAULT = 0,
FLAG_IS_FRAGMENT = 1 << 0,
FLAG_ADMIN = 1 << 1,
FLAG_NO_FRAGMENT = 1 << 2,
FLAG_CUSTODY = 1 << 3,
FLAG_SINGLETON = 1 << 4,
FLAG_ACK = 1 << 5,
PRIO_RESET = ~(0x3 << 7),
PRIO_BULK = 0x0 << 7,
PRIO_NORMAL = 0x1 << 7,
PRIO_EXPEDITED = 0x2 << 7,
REPORT_RECEPTION = 1 << 14,
REPORT_CUSTODY = 1 << 15,
REPORT_FORWARDING = 1 << 16,
REPORT_DELIVERY = 1 << 17,
REPORT_DELETION = 1 << 18,
FLAG_REPLICATE = 1 << 0,
FLAG_TRANSMIT_STATUS = 1 << 1,
FLAG_DELETE_BUNDLE = 1 << 2,
FLAG_LAST_BLOCK = 1 << 3,
FLAG_DISCARD_BLOCK = 1 << 4,
FLAG_FORWARDED = 1 << 5,
FLAG_CONTAINS_REF = 1 << 6,
FLAG_INVALID = 1 << 31,
};
#endif
| // See copyright notice in Copying.
#ifndef COMMON_BLOCK_H
#define COMMON_BLOCK_H
#define FLAG_DEFAULT 0u
#define FLAG_IS_FRAGMENT (1u << 0)
#define FLAG_ADMIN (1u << 1)
#define FLAG_NO_FRAGMENT (1u << 2)
#define FLAG_CUSTODY (1u << 3)
#define FLAG_SINGLETON (1u << 4)
#define FLAG_ACK (1u << 5)
#define PRIO_RESET ~(0x3u << 7)
#define PRIO_BULK (0x0u << 7)
#define PRIO_NORMAL (0x1u << 7)
#define PRIO_EXPEDITED (0x2u << 7)
#define REPORT_RECEPTION (1u << 14)
#define REPORT_CUSTODY (1u << 15)
#define REPORT_FORWARDING (1u << 16)
#define REPORT_DELIVERY (1u << 17)
#define REPORT_DELETION (1u << 18)
#define FLAG_REPLICATE (1u << 0)
#define FLAG_TRANSMIT_STATUS (1u << 1)
#define FLAG_DELETE_BUNDLE (1u << 2)
#define FLAG_LAST_BLOCK (1u << 3)
#define FLAG_DISCARD_BLOCK (1u << 4)
#define FLAG_FORWARDED (1u << 5)
#define FLAG_CONTAINS_REF (1u << 6)
#define FLAG_INVALID (1u << 31)
#endif
| Convert flag constants from enum to defines | Convert flag constants from enum to defines
This fixes signedness errors
| C | mit | kchmck/mkbundle |
2b708e4b50326969e78877fdf144624d79815b8d | src/unionfs.h | src/unionfs.h | /*
* License: BSD-style license
* Copyright: Radek Podgorny <[email protected]>,
* Bernd Schubert <[email protected]>
*/
#ifndef UNIONFS_H
#define UNIONFS_H
#define PATHLEN_MAX 1024
#define HIDETAG "_HIDDEN~"
#define METADIR ".unionfs/"
typedef struct {
char *path;
int fd; // used to prevent accidental umounts of path
unsigned char rw; // the writable flag
} branch_entry_t;
/**
* structure to have information about the current union
*/
typedef struct {
// read-writable branches
struct rw_branches {
int n_rw; // number of rw-branches
unsigned *rw_br; // integer array of rw-branches
} rw_branches;
// branches used for statfs
struct statvfs {
int nbranches; // number of statvfs branches
int *branches; // array of integers with the branch numbers
} statvfs;
} ufeatures_t;
extern ufeatures_t ufeatures;
#endif
| /*
* License: BSD-style license
* Copyright: Radek Podgorny <[email protected]>,
* Bernd Schubert <[email protected]>
*/
#ifndef UNIONFS_H
#define UNIONFS_H
#define PATHLEN_MAX 1024
#define HIDETAG "_HIDDEN~"
#define METADIR ".unionfs/"
typedef struct {
char *path;
int fd; // used to prevent accidental umounts of path
unsigned char rw; // the writable flag
} branch_entry_t;
/**
* structure to have information about the current union
*/
typedef struct {
// read-writable branches
struct rw_branches {
int n_rw; // number of rw-branches
unsigned *rw_br; // integer array of rw-branches
} rw_branches;
// branches used for statfs
struct ustatvfs {
int nbranches; // number of statvfs branches
int *branches; // array of integers with the branch numbers
} statvfs;
} ufeatures_t;
extern ufeatures_t ufeatures;
#endif
| Rename our struct statvfs to struct ustatvfs to prevent libc name collision. | Rename our struct statvfs to struct ustatvfs to prevent libc name collision.
| C | bsd-3-clause | evnu/unionfs-fuse,evnu/unionfs-fuse,kissthink/unionfs-fuse-1,jrk/unionfs-fuse,yogoloth/unionfs-fuse,kissthink/unionfs-fuse-1,yogoloth/unionfs-fuse,jrk/unionfs-fuse,jrk/unionfs-fuse,yogoloth/unionfs-fuse,jrk/unionfs-fuse,kissthink/unionfs-fuse-1,evnu/unionfs-fuse |
9cea98e320bfc37a6df373245f916b15c68a7f01 | src/consensus/consensus.h | src/consensus/consensus.h | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CONSENSUS_CONSENSUS_H
#define BITCOIN_CONSENSUS_CONSENSUS_H
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 100;
/** Flags for nSequence and nLockTime locks */
enum {
/* Interpret sequence numbers as relative lock-time constraints. */
LOCKTIME_VERIFY_SEQUENCE = (1 << 0),
/* Use GetMedianTimePast() instead of nTime for end point timestamp. */
LOCKTIME_MEDIAN_TIME_PAST = (1 << 1),
};
#endif // BITCOIN_CONSENSUS_CONSENSUS_H
| // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2016 The Bitcoin Ocho developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CONSENSUS_CONSENSUS_H
#define BITCOIN_CONSENSUS_CONSENSUS_H
/** The maximum allowed size for a serialized block, in bytes (network rule) */
/** Bitcoin Ocho, we multiply by 8 for Ocho */
static const unsigned int MAX_BLOCK_SIZE = 1000000*8;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 100;
/** Flags for nSequence and nLockTime locks */
enum {
/* Interpret sequence numbers as relative lock-time constraints. */
LOCKTIME_VERIFY_SEQUENCE = (1 << 0),
/* Use GetMedianTimePast() instead of nTime for end point timestamp. */
LOCKTIME_MEDIAN_TIME_PAST = (1 << 1),
};
#endif // BITCOIN_CONSENSUS_CONSENSUS_H
| Add more Ochoness to Bitcoin. | Add more Ochoness to Bitcoin.
| C | mit | goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin |
ab5acba34782d735f759c709e74d957c9d7418ba | test/FrontendC/2009-03-09-WeakDeclarations-1.c | test/FrontendC/2009-03-09-WeakDeclarations-1.c | // RUN: $llvmgcc $test -c -o /dev/null |& \
// RUN: egrep {(14|15|22): warning:} | \
// RUN: wc -l | grep --quiet 3
// TARGET: *-*-darwin
// XFAIL: alpha|ia64|sparc
// END.
// Insist upon warnings for inappropriate weak attributes.
// Note the line numbers (14|15|22) embedded in the check.
// O.K.
extern int ext_weak_import __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
int decl_weak_import __attribute__ ((__weak_import__));
int decl_initialized_weak_import __attribute__ ((__weak_import__)) = 13;
// O.K.
extern int ext_f(void) __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
int def_f(void) __attribute__ ((__weak_import__));
int __attribute__ ((__weak_import__)) decl_f(void) {return 0;};
| // RUN: $llvmgcc $test -c -o /dev/null |& \
// RUN: egrep {(14|15|22): warning:} | \
// RUN: wc -l | grep --quiet 3
// XTARGET: darwin
// XFAIL: *
// END.
// Insist upon warnings for inappropriate weak attributes.
// Note the line numbers (14|15|22) embedded in the check.
// O.K.
extern int ext_weak_import __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
int decl_weak_import __attribute__ ((__weak_import__));
int decl_initialized_weak_import __attribute__ ((__weak_import__)) = 13;
// O.K.
extern int ext_f(void) __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
int def_f(void) __attribute__ ((__weak_import__));
int __attribute__ ((__weak_import__)) decl_f(void) {return 0;};
| Tweak the DejaGNU voodoo to match Bill's advice. | Tweak the DejaGNU voodoo to match Bill's advice.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@66547 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm |
974eb1d090aece41e72c31772ea7266b1e31f6e7 | test/Modules/Inputs/submodules/import-self-b.h | test/Modules/Inputs/submodules/import-self-b.h | @import import_self.c;
#include "import-self-d.h"
// FIXME: This should not work; names from 'a' should not be visible here.
MyTypeA import_self_test_a;
// FIXME: This should work but does not; names from 'b' are not actually visible here.
//MyTypeC import_self_test_c;
MyTypeD import_self_test_d;
| // FIXME: This import has no effect, because the submodule isn't built yet, and
// we don't map an @import to a #include in this case.
@import import_self.c;
#include "import-self-d.h"
// FIXME: This should not work; names from 'a' should not be visible here.
MyTypeA import_self_test_a;
// FIXME: This should work but does not; names from 'c' are not actually visible here.
//MyTypeC import_self_test_c;
MyTypeD import_self_test_d;
| Fix comment typo in test. | Fix comment typo in test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@200584 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang |
4169674ac51c5b7c238171daa15dc09a2db51715 | libkdepim/kabcresourcenull.h | libkdepim/kabcresourcenull.h | /*
This file is part of libkdepim.
Copyright (c) 2004 Cornelius Schumacher <[email protected]>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef KABC_RESOURCENULL_H
#define KABC_RESOURCENULL_H
#include <kabc/resource.h>
namespace KABC {
/**
This resource does nothing.
*/
class ResourceNull : public Resource
{
public:
ResourceNull( const KConfig *cfg ) : Resource( cfg ) {}
ResourceNull() : Resource( 0 ) {}
virtual ~ResourceNull() {}
Ticket *requestSaveTicket() { return 0; }
void releaseSaveTicket( Ticket * ) {}
bool load() { return false; }
bool save( Ticket * ) { return false; }
};
}
#endif
| Add null resource for KABC::AddressBook. | Add null resource for KABC::AddressBook.
svn path=/trunk/kdepim/; revision=295385
| C | lgpl-2.1 | lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi |
|
d9eb347432f247879ba10da2a64f810657a09c84 | source/core/recommend-manager/RandGenerator.h | source/core/recommend-manager/RandGenerator.h | /**
* @file RandGenerator.h
* @brief generate random item ids
* @author Jun Jiang
* @date 2011-11-30
*/
#ifndef RAND_GENERATOR_H
#define RAND_GENERATOR_H
#include <util/ThreadModel.h>
#include <boost/random.hpp>
namespace sf1r
{
template<typename ValueType = int,
typename Distribution = boost::uniform_int<ValueType>,
typename Engine = boost::mt19937,
typename LockType = izenelib::util::ReadWriteLock>
class RandGenerator
{
public:
RandGenerator()
: generator_(Engine(), Distribution())
{}
void seed(int value)
{
ScopedWriteLock lock(lock_);
generator_.engine().seed(value);
}
ValueType generate(ValueType min, ValueType max)
{
ScopedWriteLock lock(lock_);
Distribution& dist = generator_.distribution();
if (dist.min() != min || dist.max() != max)
{
dist = Distribution(min, max);
}
return generator_();
}
private:
typedef boost::variate_generator<Engine, Distribution> Generator;
Generator generator_;
typedef izenelib::util::ScopedWriteLock<LockType> ScopedWriteLock;
LockType lock_;
};
} // namespace sf1r
#endif // RAND_GENERATOR_H
| /**
* @file RandGenerator.h
* @brief generate random item ids
* @author Jun Jiang
* @date 2011-11-30
*/
#ifndef RAND_GENERATOR_H
#define RAND_GENERATOR_H
#include <util/ThreadModel.h>
#include <boost/random.hpp>
namespace sf1r
{
template<typename ValueType = int,
typename Distribution = boost::uniform_int<ValueType>,
typename Engine = boost::mt19937,
typename LockType = izenelib::util::ReadWriteLock>
class RandGenerator
{
public:
RandGenerator()
: generator_(Engine(), Distribution())
{}
void seed(unsigned int value)
{
ScopedWriteLock lock(lock_);
Engine& engine = generator_.engine();
engine.seed(value);
}
ValueType generate(ValueType min, ValueType max)
{
ScopedWriteLock lock(lock_);
Distribution& dist = generator_.distribution();
if (dist.min() != min || dist.max() != max)
{
dist = Distribution(min, max);
}
return generator_();
}
private:
typedef boost::variate_generator<Engine, Distribution> Generator;
Generator generator_;
typedef izenelib::util::ScopedWriteLock<LockType> ScopedWriteLock;
LockType lock_;
};
} // namespace sf1r
#endif // RAND_GENERATOR_H
| Fix compile error under boost 1.38, caused by boost/random.hpp seed() | Fix compile error under boost 1.38, caused by boost/random.hpp seed()
| C | apache-2.0 | pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-lite,izenecloud/sf1r-lite,izenecloud/sf1r-lite,pombredanne/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,pombredanne/sf1r-lite,izenecloud/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-ad-delivery |
f5e8daa70a39edf01a823aaee724c3d930064a53 | include/TaskBase.h | include/TaskBase.h | #ifndef _TPOOL_TASK_BASE_H_
#define _TPOOL_TASK_BASE_H_
#include <boost/shared_ptr.hpp>
namespace tpool {
class TaskBase {
public:
typedef boost::shared_ptr<TaskBase> Ptr;
~TaskBase() {}
virtual void Do() = 0;
};
}
#endif
| #ifndef _TPOOL_TASK_BASE_H_
#define _TPOOL_TASK_BASE_H_
#include <boost/shared_ptr.hpp>
namespace tpool {
class TaskBase {
public:
typedef boost::shared_ptr<TaskBase> Ptr;
enum State {
INIT,
RUNNING,
FINISHED,
CANCELED,
};
~TaskBase() {}
virtual void Do() = 0;
virtual State GetState() const;
};
}
#endif
| Add the state definitions for Task. | Add the state definitions for Task.
| C | mit | airekans/Tpool,airekans/Tpool,airekans/Tpool |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.