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
|
---|---|---|---|---|---|---|---|---|---|
6719e546217bdc012ed0b1853032987c1d4e7a49 | src/daemon/serversock.h | src/daemon/serversock.h | /**
* tapcfg - A cross-platform configuration utility for TAP driver
* Copyright (C) 2008 Juho Vähä-Herttua
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
#ifndef SERVERSOCK_H
#define SERVERSOCK_H
#include "tapcfg.h"
typedef struct serversock_s serversock_t;
serversock_t *serversock_tcp(unsigned short *local_port, int use_ipv6, int public);
int serversock_get_fd(serversock_t *server);
int serversock_accept(serversock_t *server);
void serversock_destroy(serversock_t *server);
#endif
| Add missing header from last commit | Add missing header from last commit | C | lgpl-2.1 | juhovh/tapcfg,eyecreate/tapcfg,juhovh/tapcfg,zhanleewo/tapcfg,zhanleewo/tapcfg,eyecreate/tapcfg,juhovh/tapcfg,juhovh/tapcfg,juhovh/tapcfg,eyecreate/tapcfg,zhanleewo/tapcfg,eyecreate/tapcfg,juhovh/tapcfg,zhanleewo/tapcfg,zhanleewo/tapcfg,eyecreate/tapcfg |
|
abdcf820d40c063e8542291cfbf51a6eb7e28253 | usespace/daemon-one.c | usespace/daemon-one.c | #include <signal.h>
#include <unistd.h>
#include <stdlib.h>
void spawn_again(int signum)
{
(void) signum; /* unused */
pid_t pid = fork();
if (pid == 0) {
setsid();
return;
}
exit(EXIT_SUCCESS);
}
int main(int argc, char **argv)
{
struct sigaction new_action = { 0 };
new_action.sa_handler = &spawn_again;
sigaction (SIGTERM, &new_action, NULL);
/* do something */
while(1) {};
}
| #include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/shm.h>
#define NUMBER_OF_THE_BEAST 666
struct shared {
pid_t pid;
};
static struct shared *shared;
void spawn_again(int signum)
{
(void) signum; /* unused */
pid_t pid = fork();
if (pid == 0) {
/* signalize change of pid ...
* don't bother with atomicity here...
* */
shared->pid = getpid();
setsid();
return;
}
exit(EXIT_SUCCESS);
}
int main(int argc, char **argv)
{
/* Initialize shard memory */
const int shmid = shmget(NUMBER_OF_THE_BEAST, sizeof(struct shared), IPC_CREAT | 0666);
if (shmid == -1) {
perror("shmget failed!");
exit(EXIT_FAILURE);
}
shared = (struct shared*) shmat(shmid, NULL, 0);
if (shared == NULL) {
perror("shmat failed!");
exit(EXIT_FAILURE);
}
shared->pid = getpid();
/* Set signal handlers */
struct sigaction new_action = { 0 };
new_action.sa_handler = &spawn_again;
sigaction (SIGTERM, &new_action, NULL);
/* do something */
while(1) {};
}
| Add basic support for shared memory | userspace: Add basic support for shared memory
Basic communication protocol between daemons.
| C | bsd-3-clause | ClosedHouse/contest,ClosedHouse/contest,ClosedHouse/contest |
50e626531255c21434a9680e8c9986edb1ae90f4 | tests/noreturn.c | tests/noreturn.c | #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "noreturn.h"
// Because assert_fail is marked as noreturn, the call to it is not followed
// by another instruction in this function.
// This test ensures that "thisFunctionWontReturn is on the dumped stack.
int thisFunctionWontReturn(int x)
{
if (x) {
for (int i = 0; i < 10; ++i) {
printf("%d green bottles hanging on the wall", 10 - i);
}
thisFunctionTerminatesTheProcess();
}
return 0;
}
int
main()
{
thisFunctionWontReturn(1);
}
| #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "noreturn.h"
// Because assert_fail is marked as noreturn, the call to it is not followed
// by another instruction in this function.
// This test ensures that "thisFunctionWontReturn is on the dumped stack.
__attribute__((noinline, weak)) // avoid inlining or IPO.
int thisFunctionWontReturn(int x)
{
if (x) {
for (int i = 0; i < 10; ++i) {
printf("%d green bottles hanging on the wall\n", 10 - i);
}
thisFunctionTerminatesTheProcess();
}
return 0;
}
int
main()
{
thisFunctionWontReturn(1);
}
| Make tests work in gcc11/clang | Make tests work in gcc11/clang
When inlined, we lose our stackframe for our trampoline function in this
test - disallow the optimisations that break the test.
| C | bsd-2-clause | peadar/pstack,peadar/pstack,peadar/pstack,peadar/pstack |
cd0f72316db95b941ab54a682a7687dbbd83f0a5 | test/main.c | test/main.c |
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
#include <stdio.h>
int main(int argc, char** argv)
{
if (argc < 2)
{
printf("err\n");
return -1;
}
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result result = cgltf_parse_file(&options, argv[1], &data);
if (result == cgltf_result_success)
result = cgltf_load_buffers(&options, data, argv[1]);
printf("Result: %d\n", result);
if (result == cgltf_result_success)
{
printf("Type: %u\n", data->file_type);
printf("Meshes: %lu\n", data->meshes_count);
}
cgltf_free(data);
return result;
}
|
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
#include <stdio.h>
int main(int argc, char** argv)
{
if (argc < 2)
{
printf("err\n");
return -1;
}
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result result = cgltf_parse_file(&options, argv[1], &data);
if (result == cgltf_result_success)
result = cgltf_load_buffers(&options, data, argv[1]);
if (result == cgltf_result_success)
result = cgltf_validate(data);
printf("Result: %d\n", result);
if (result == cgltf_result_success)
{
printf("Type: %u\n", data->file_type);
printf("Meshes: %lu\n", data->meshes_count);
}
cgltf_free(data);
return result;
}
| Add validation to test program | Add validation to test program
This makes sure we exercise this code during CI for all test models.
| C | mit | jkuhlmann/cgltf,jkuhlmann/cgltf,jkuhlmann/cgltf |
70fd50533e75e7da1cc691b9da8e47af3d84ba3d | src/brpc/server_node.h | src/brpc/server_node.h | // Copyright (c) 2014 Baidu, 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.
//
// Authors: Ge,Jun ([email protected])
#ifndef BRPC_SERVER_NODE_H
#define BRPC_SERVER_NODE_H
#include <string>
#include "butil/endpoint.h"
namespace brpc {
// Representing a server inside a NamingService.
struct ServerNode {
ServerNode() {}
explicit ServerNode(const butil::EndPoint& pt) : addr(pt) {}
ServerNode(butil::ip_t ip, int port, const std::string& tag2)
: addr(ip, port), tag(tag2) {}
ServerNode(const butil::EndPoint& pt, const std::string& tag2)
: addr(pt), tag(tag2) {}
ServerNode(butil::ip_t ip, int port) : addr(ip, port) {}
butil::EndPoint addr;
std::string tag;
};
inline bool operator<(const ServerNode& n1, const ServerNode& n2)
{ return n1.addr != n2.addr ? (n1.addr < n2.addr) : (n1.tag < n2.tag); }
inline bool operator==(const ServerNode& n1, const ServerNode& n2)
{ return n1.addr == n2.addr && n1.tag == n2.tag; }
inline bool operator!=(const ServerNode& n1, const ServerNode& n2)
{ return !(n1 == n2); }
inline std::ostream& operator<<(std::ostream& os, const ServerNode& n) {
os << n.addr;
if (!n.tag.empty()) {
os << "(tag=" << n.tag << ')';
}
return os;
}
} // namespace brpc
#endif // BRPC_SERVER_NODE_H
| Move ServerNode into separate file | Move ServerNode into separate file
| C | apache-2.0 | brpc/brpc,brpc/brpc,brpc/brpc,brpc/brpc,brpc/brpc |
|
6ea1de571f78c28e304b7c9e496e98754fed8cbc | Numerics/src/NonSmoothSolvers/MCP/MCP_driver.c | Numerics/src/NonSmoothSolvers/MCP/MCP_driver.c | /* Siconos-Numerics, Copyright INRIA 2005-2011.
* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
* Siconos is a free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* Siconos 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 Siconos; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Contact: Vincent ACARY, [email protected]
*/
//#include "SolverOptions.h"
//#include "MixedComplementarityProblem.h"
#include <assert.h>
#include "MCP_Solvers.h"
#include "MCP_cst.h"
char SICONOS_MCP_NEWTON_FBLSA_STR[] = "Newton FBLSA";
char SICONOS_MCP_NEWTON_MINFBLSA_STR[] = "Newton minFBLSA";
int mcp_driver2(MixedComplementarityProblem2* problem, double *z , double *Fmcp, SolverOptions* options, NumericsOptions* global_options)
{
assert(options != NULL);
/* Set global options */
if (global_options)
setNumericsOptions(global_options);
/* Checks inputs */
assert(problem != NULL);
assert(z != NULL);
assert(Fmcp != NULL);
/* Output info. : 0: ok - >0: error (which depends on the chosen solver) */
int info = -1;
switch (options->solverId)
{
case SICONOS_MCP_NEWTON_FBLSA: // Fischer-Burmeister/Newton -- new version
mcp_newton_FBLSA(problem, z, Fmcp, &info, options);
break;
case SICONOS_MCP_NEWTON_MINFBLSA: // Fischer-Burmeister/Newton + min descent direction
mcp_newton_minFBLSA(problem, z, Fmcp, &info, options);
break;
default:
fprintf(stderr, "mcp_driver error: unknown solver id: %d\n", options->solverId);
exit(EXIT_FAILURE);
}
return info;
}
| Fix lower/uppercase file name stuff. Please remember Macos users and do not change filename from upper to lowercase ... | Fix lower/uppercase file name stuff. Please remember Macos users and do not change filename from upper to lowercase ...
| C | apache-2.0 | fperignon/siconos,siconos/siconos,siconos/siconos-deb,fperignon/siconos,fperignon/siconos,fperignon/siconos,siconos/siconos-deb,bremond/siconos,radarsat1/siconos,bremond/siconos,radarsat1/siconos,bremond/siconos,siconos/siconos,bremond/siconos,radarsat1/siconos,radarsat1/siconos,siconos/siconos-deb,siconos/siconos-deb,siconos/siconos,bremond/siconos,fperignon/siconos,siconos/siconos-deb,radarsat1/siconos,siconos/siconos,siconos/siconos-deb |
|
9531b2a558971e61047019ad4eaa9ed0830442bd | apps/sensors/main.c | apps/sensors/main.c | #include <firestorm.h>
#include <isl29035.h>
#include <stdio.h>
#include <stdbool.h>
void print_intensity(int intensity) {
printf("Intensity: %d\n", intensity);
}
void intensity_cb(int intensity, int unused1, int unused2, void* ud) {
print_intensity(intensity);
}
void temp_callback(int temp_value, int err, int unused, void* ud) {
gpio_toggle(LED_0);
printf("Current Temp (%d) [0x%X]\n", temp_value, err);
}
void timer_fired(int arg0, int arg1, int arg2, void* ud) {
isl29035_start_intensity_reading();
}
int main() {
printf("Hello\n");
gpio_enable_output(LED_0);
isl29035_subscribe(intensity_cb, NULL);
// Setup periodic timer
timer_subscribe(timer_fired, NULL);
timer_start_repeating(1000);
tmp006_start_sampling(0x2, temp_callback, NULL);
return 0;
}
| #include <firestorm.h>
#include <isl29035.h>
#include <stdio.h>
#include <stdbool.h>
void print_intensity(int intensity) {
printf("Intensity: %d\n", intensity);
}
void intensity_cb(int intensity, int unused1, int unused2, void* ud) {
print_intensity(intensity);
}
void temp_callback(int temp_value, int err, int unused, void* ud) {
printf("Current Temp (%d) [0x%X]\n", temp_value, err);
}
void timer_fired(int arg0, int arg1, int arg2, void* ud) {
isl29035_start_intensity_reading();
}
int main() {
printf("Hello\n");
isl29035_subscribe(intensity_cb, NULL);
// Setup periodic timer
timer_subscribe(timer_fired, NULL);
timer_start_repeating(1000);
tmp006_start_sampling(0x2, temp_callback, NULL);
return 0;
}
| Remove blink functionality from "sensors" app | Remove blink functionality from "sensors" app
Now that we can run multiple apps simultaneously, it's easier to test
things if the sensors app doesn't clobber the blink app.
| C | apache-2.0 | google/tock-on-titan,google/tock-on-titan,google/tock-on-titan |
e5fc7d47e00c9d375a320b97e19790715c6e8104 | liblick/lick.h | liblick/lick.h | /**
* @file
* @brief A convenience header
*
* A header which includes all headers needed for a front-end
*/
#include "boot-loader.h"
#include "drives.h"
#include "install.h"
#include "lickdir.h"
#include "llist.h"
#include "menu.h"
#include "system-info.h"
#include "utils.h"
| /**
* @file
* @brief A convenience header
*
* A header which includes all headers needed for a front-end
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "boot-loader.h"
#include "drives.h"
#include "install.h"
#include "lickdir.h"
#include "llist.h"
#include "menu.h"
#include "system-info.h"
#include "utils.h"
#ifdef __cplusplus
}
#endif
| Add `extern "C"' to convenience headers | Add `extern "C"' to convenience headers
| C | mit | noryb009/lick,noryb009/lick,noryb009/lick |
d53bc3437f941cf01bf709ddd8e9c394db095b7a | libm/s_isnan.c | libm/s_isnan.c | /*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/*
* isnan(x) returns 1 is x is nan, else 0;
* no branching!
*/
#include "math.h"
#include "math_private.h"
int __isnan(double x)
{
int32_t hx,lx;
EXTRACT_WORDS(hx,lx,x);
hx &= 0x7fffffff;
hx |= (u_int32_t)(lx|(-lx))>>31;
hx = 0x7ff00000 - hx;
return (int)(((u_int32_t)hx)>>31);
}
libm_hidden_def(__isnan)
| /*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/*
* isnan(x) returns 1 is x is nan, else 0;
* no branching!
*/
#include "math.h"
#include "math_private.h"
int __isnan(double x)
{
int32_t hx,lx;
EXTRACT_WORDS(hx,lx,x);
hx &= 0x7fffffff;
hx |= (u_int32_t)(lx|(-lx))>>31;
hx = 0x7ff00000 - hx;
return (int)(((u_int32_t)hx)>>31);
}
weak_alias(__isnan, isnan)
libm_hidden_def(__isnan)
| Add isnan weak alias to __isnan | isnan: Add isnan weak alias to __isnan
* libm/s_isnan.c: Add isnan weak alias.
Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
| C | lgpl-2.1 | kraj/uclibc-ng,wbx-github/uclibc-ng,wbx-github/uclibc-ng,wbx-github/uclibc-ng,kraj/uclibc-ng,wbx-github/uclibc-ng,kraj/uclibc-ng,kraj/uclibc-ng |
a99df4d6c91366304dcf55b986d555115e3cc6a6 | aimp_dotnet/AIMPPlugin.h | aimp_dotnet/AIMPPlugin.h | #pragma once
#include "Services\MenuManager\ServiceMenuManager.h"
#include "InternalLogger.h"
namespace AIMP
{
namespace SDK
{
using namespace System;
using namespace AIMP::SDK::Interfaces;
public ref class AimpPlugin abstract : public AimpPluginBase
{
public:
AimpPlugin()
{
}
property IAimpCore^ AimpCore
{
IAimpCore^ get()
{
return _aimpCore;
}
}
property IAimpPlayer^ Player
{
IAimpPlayer^ get()
{
return (IAimpPlayer^) AimpPlayer;
}
}
property AIMP::SDK::Logger::ILogger ^LoggerManager
{
AIMP::SDK::Logger::ILogger ^get()
{
return AIMP::SDK::InternalLogger::Instance;
}
}
private:
IAimpCore^ _aimpCore;
ServiceMenuManager^ _menuManager;
};
}
} | #pragma once
#include "Services\MenuManager\ServiceMenuManager.h"
#include "InternalLogger.h"
namespace AIMP
{
namespace SDK
{
using namespace System;
using namespace AIMP::SDK::Interfaces;
public ref class AimpPlugin abstract : public AimpPluginBase
{
public:
AimpPlugin()
{
}
property IAimpCore^ AimpCore
{
IAimpCore^ get()
{
return Player->Core;
}
}
property IAimpPlayer^ Player
{
IAimpPlayer^ get()
{
return (IAimpPlayer^) AimpPlayer;
}
}
property AIMP::SDK::Logger::ILogger ^LoggerManager
{
AIMP::SDK::Logger::ILogger ^get()
{
return AIMP::SDK::InternalLogger::Instance;
}
}
private:
ServiceMenuManager^ _menuManager;
};
}
} | Fix AimpPlugin.AimpCore property which was never initialized. | Fix AimpPlugin.AimpCore property which was never initialized.
Remove the _aimpCore field and use Player instead.
| C | apache-2.0 | martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet |
8aba5772afe0e409e2e6d52131433b0a79188f3a | include/response.h | include/response.h | #ifndef CPR_RESPONSE_H
#define CPR_RESPONSE_H
#include <string>
#include "cookies.h"
#include "cprtypes.h"
namespace cpr {
class Response {
public:
Response(const long& status_code, const std::string& text, const Header& header, const Url& url,
const double& elapsed)
: status_code{status_code}, text{text}, header{header}, url{url}, elapsed{elapsed} {};
Response(const long& status_code, const std::string& text, const Header& header, const Url& url,
const double& elapsed, const Cookies& cookies)
: status_code{status_code}, text{text}, header{header}, url{url}, elapsed{elapsed},
cookies{cookies} {};
Response() = default;
long status_code;
std::string text;
Header header;
Url url;
double elapsed;
Cookies cookies;
};
}
#endif
| #ifndef CPR_RESPONSE_H
#define CPR_RESPONSE_H
#include <string>
#include "cookies.h"
#include "cprtypes.h"
namespace cpr {
class Response {
public:
Response() = default;
Response(const long& status_code, const std::string& text, const Header& header, const Url& url,
const double& elapsed)
: status_code{status_code}, text{text}, header{header}, url{url}, elapsed{elapsed} {};
Response(const long& status_code, const std::string& text, const Header& header, const Url& url,
const double& elapsed, const Cookies& cookies)
: status_code{status_code}, text{text}, header{header}, url{url}, elapsed{elapsed},
cookies{cookies} {};
long status_code;
std::string text;
Header header;
Url url;
double elapsed;
Cookies cookies;
};
}
#endif
| Put the default constructor first | Put the default constructor first
| C | mit | whoshuu/cpr,SuperV1234/cpr,SuperV1234/cpr,msuvajac/cpr,skystrife/cpr,skystrife/cpr,whoshuu/cpr,msuvajac/cpr,whoshuu/cpr,SuperV1234/cpr,msuvajac/cpr,skystrife/cpr |
572e987700fc8c155853dba9b1f192d999caa083 | lib/utilities/utils.h | lib/utilities/utils.h | /*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
*
* @(#)utils.h 8.3 (Berkeley) 3/20/94
*/
/* utility definitions */
#ifndef _POSIX2_RE_DUP_MAX
#define _POSIX2_RE_DUP_MAX 255
#endif
#define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */
#define INFINITY (DUPMAX + 1)
#define NC (CHAR_MAX - CHAR_MIN + 1)
typedef unsigned char uch;
/* switch off assertions (if not already off) if no REDEBUG */
#ifndef REDEBUG
#ifndef NDEBUG
#define NDEBUG /* no assertions please */
#endif
#endif
#include <assert.h>
/* for old systems with bcopy() but no memmove() */
#ifdef USEBCOPY
#define memmove(d, s, c) bcopy(s, d, c)
#endif
| Add smyrna to main graphviz tree | Add smyrna to main graphviz tree
| C | epl-1.0 | MjAbuz/graphviz,ellson/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,jho1965us/graphviz,pixelglow/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,kbrock/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,tkelman/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,jho1965us/graphviz,tkelman/graphviz,MjAbuz/graphviz,kbrock/graphviz,ellson/graphviz,kbrock/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,pixelglow/graphviz,pixelglow/graphviz,jho1965us/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,ellson/graphviz,kbrock/graphviz,jho1965us/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelman/graphviz,pixelglow/graphviz,tkelman/graphviz,tkelman/graphviz,kbrock/graphviz,jho1965us/graphviz,ellson/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,jho1965us/graphviz,pixelglow/graphviz,MjAbuz/graphviz,jho1965us/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,kbrock/graphviz,kbrock/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,ellson/graphviz,kbrock/graphviz |
|
1b4d49cbf1b05997cd7fe468c06cf78a2a90af43 | modules/seed-module.h | modules/seed-module.h | #ifndef _SEED_MODULE_H_
#define _SEED_MODULE_H_
#include "../libseed/seed.h"
// TODO: Move [example sqlite canvas Multiprocessing
// os sandbox dbus libxml cairo]
// towards utilization of this header.
// Check that the required number of arguments were passed into a seed callback.
// If this is not true, raise an exception and return null.
// This requires the callback to use "argument_count", "ctx", and "exception"
// as the names of the various function arguments.
#define CHECK_ARG_COUNT(name, argnum) \
if ( argument_count != argnum ) \
{ \
seed_make_exception (ctx, exception, "ArgumentError", \
"wrong number of arguments; wanted %s, got %Zd", \
#argnum, argument_count); \
return seed_make_undefined (ctx); \
}
// Defines a property on holder for the given enum member
#define DEFINE_ENUM_MEMBER(holder, member) \
seed_object_set_property(ctx, holder, #member, \
seed_value_from_long(ctx, member, NULL))
// Defines a property on holder for the given enum member, with the given name
#define DEFINE_ENUM_MEMBER_EXT(holder, name, val) \
seed_object_set_property(ctx, holder, name, \
seed_value_from_long(ctx, val, NULL))
#endif
| #ifndef _SEED_MODULE_H_
#define _SEED_MODULE_H_
#include "../libseed/seed.h"
// TODO: Move [example sqlite canvas Multiprocessing
// os sandbox dbus libxml cairo]
// towards utilization of this header.
// Check that the required number of arguments were passed into a seed callback.
// If this is not true, raise an exception and return null.
// This requires the callback to use "argument_count", "ctx", and "exception"
// as the names of the various function arguments.
#define CHECK_ARG_COUNT(name, argnum) \
if ( argument_count != argnum ) \
{ \
seed_make_exception (ctx, exception, "ArgumentError", \
"wrong number of arguments; expected %s, got %Zd", \
#argnum, argument_count); \
return seed_make_undefined (ctx); \
}
// Defines a property on holder for the given enum member
#define DEFINE_ENUM_MEMBER(holder, member) \
seed_object_set_property(ctx, holder, #member, \
seed_value_from_long(ctx, member, NULL))
// Defines a property on holder for the given enum member, with the given name
#define DEFINE_ENUM_MEMBER_EXT(holder, name, val) \
seed_object_set_property(ctx, holder, name, \
seed_value_from_long(ctx, val, NULL))
#endif
| Change wording of argument count check | [modules] Change wording of argument count check
| C | lgpl-2.1 | danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed |
ac5d12bb0cdc8cf909ab0d711cbc2a370b1eece2 | test/CodeGen/mips-inline-asm-abi.c | test/CodeGen/mips-inline-asm-abi.c | // REQUIRES: mips-registered-target
// RUN: %clang_cc1 -triple mips-linux-gnu -emit-obj -o - %s | \
// RUN: llvm-readobj -h - | FileCheck %s
// CHECK: EF_MIPS_ABI_O32
__asm__(
"bar:\n"
" nop\n"
);
void foo() {}
| Add test case to check ABI flag emissions in case of inline assembler | [mips] Add test case to check ABI flag emissions in case of inline assembler
Follow up to r247546. The test case reproduces the problem fixed by this commit.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@247548 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang |
|
4ec209a4c7e1d9c0903f454c5aa3c8e2ed19edb0 | cmd/smyrna/topviewdefs.h | cmd/smyrna/topviewdefs.h | #ifndef TOPVIEWDEFS_H
#define TOPVIEWDEFS_H
#include "smyrnadefs.h"
#include "gui.h"
#include "tvnodes.h"
#include "glcompset.h"
#endif
| /* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifndef TOPVIEWDEFS_H
#define TOPVIEWDEFS_H
#include "smyrnadefs.h"
#include "gui.h"
#include "tvnodes.h"
#include "glcompset.h"
#endif
| Clean up smyrna files: remove unnecessary globals modify libraries not to rely on code in cmd/smyrna remove static declarations from .h files remove unnecessary libraries mark unused code and clean up warnings | Clean up smyrna files:
remove unnecessary globals
modify libraries not to rely on code in cmd/smyrna
remove static declarations from .h files
remove unnecessary libraries
mark unused code and clean up warnings
| C | epl-1.0 | MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,kbrock/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,kbrock/graphviz,kbrock/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,pixelglow/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,kbrock/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,pixelglow/graphviz,MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,tkelman/graphviz,pixelglow/graphviz,jho1965us/graphviz,jho1965us/graphviz,jho1965us/graphviz,BMJHayward/graphviz |
6854cea3b6c5179fcf84b29194bb70c65aae82e8 | core/vulkan/vk_virtual_swapchain/cc/platform.h | core/vulkan/vk_virtual_swapchain/cc/platform.h | /*
* Copyright (C) 2018 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.
*/
#ifndef VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_
#define VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_
#include "vulkan/vulkan.h"
#include "layer.h"
namespace swapchain {
void CreateSurface(const InstanceData* functions, VkInstance instance,
const void* data, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
}
#endif // VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_
| /*
* Copyright (C) 2018 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.
*/
#ifndef VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_
#define VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_
#include "vulkan/vulkan.h"
#include "layer.h"
namespace swapchain {
void CreateSurface(const InstanceData* functions, VkInstance instance,
const void* data, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
}
#endif // VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_
| Fix clang-format with different clang-format version | Fix clang-format with different clang-format version
| C | apache-2.0 | google/agi,google/agi,pmuetschard/gapid,Qining/gapid,pmuetschard/gapid,Qining/gapid,pmuetschard/gapid,Qining/gapid,pmuetschard/gapid,pmuetschard/gapid,google/gapid,google/agi,google/agi,google/gapid,Qining/gapid,google/gapid,google/gapid,google/agi,google/agi,pmuetschard/gapid,google/agi,google/gapid,Qining/gapid,google/gapid,pmuetschard/gapid,google/gapid,google/agi,Qining/gapid,google/gapid,Qining/gapid,Qining/gapid,pmuetschard/gapid |
98aabdc63f8ef285aadcfff35e582bba69d70bac | SocksLib/protocol/Socks5UDPRequestMessage.h | SocksLib/protocol/Socks5UDPRequestMessage.h | #ifndef SOCKS5UDPREQUESTMESSAGE_H
#define SOCKS5UDPREQUESTMESSAGE_H
#include <QHostAddress>
#include "SocksProtocolMessage.h"
class Socks5UDPRequestMessage : public SocksProtocolMessage
{
public:
Socks5UDPRequestMessage(QHostAddress dst, quint16 dstPort, QByteArray data, quint8 fragID=0);
Socks5UDPRequestMessage(QString domainName, quint16 dstPort, QByteArray data, quint8 fragID=0);
Socks5UDPRequestMessage();
//pure-virtual from SocksProtocolMessage
virtual ParseResult parse(QByteArray& bytes,QString * error =0);
//pure-virtual from SocksProtocolMessage
virtual bool toBytes(QByteArray * output,QString * error=0);
//pure-virtual from SocksProtocolMessage
virtual qint64 minimumMessageLength() const;
SocksProtocolMessage::AddressType addressType() const;
QHostAddress address() const;
QString domainName() const;
quint16 port() const;
QByteArray data() const;
private:
QHostAddress _address;
QString _domainName;
SocksProtocolMessage::AddressType _addressType;
quint16 _port;
quint8 _fragID;
QByteArray _data;
};
#endif // SOCKS5UDPREQUESTMESSAGE_H
| #ifndef SOCKS5UDPREQUESTMESSAGE_H
#define SOCKS5UDPREQUESTMESSAGE_H
#include <QHostAddress>
#include "SocksProtocolMessage.h"
class Socks5UDPRequestMessage : public SocksProtocolMessage
{
public:
Socks5UDPRequestMessage(QHostAddress dst, quint16 dstPort, QByteArray data, quint8 fragID=0);
Socks5UDPRequestMessage(QString domainName, quint16 dstPort, QByteArray data, quint8 fragID=0);
Socks5UDPRequestMessage();
//pure-virtual from SocksProtocolMessage
virtual ParseResult parse(QByteArray& bytes,QString * error =0);
//pure-virtual from SocksProtocolMessage
virtual bool toBytes(QByteArray * output,QString * error=0);
//pure-virtual from SocksProtocolMessage
virtual qint64 minimumMessageLength() const;
SocksProtocolMessage::AddressType addressType() const;
QHostAddress address() const;
QString domainName() const;
quint16 port() const;
QByteArray data() const;
private:
QHostAddress _address;
QString _domainName;
SocksProtocolMessage::AddressType _addressType;
quint16 _port;
QByteArray _data;
quint8 _fragID;
};
#endif // SOCKS5UDPREQUESTMESSAGE_H
| Fix warning about initialization order (GCC/Clang, -Wreorder) | Fix warning about initialization order (GCC/Clang, -Wreorder)
| C | bsd-2-clause | blochbergermax/Qt-Socks-Server,raptorswing/Qt-Socks-Server,blochberger/Qt-Socks-Server,blochberger/Qt-Socks-Server,raptorswing/Qt-Socks-Server,blochbergermax/Qt-Socks-Server |
195c94360f726702b4a9a2290f02db2cd547d903 | UefiCpuPkg/Include/Register/Msr.h | UefiCpuPkg/Include/Register/Msr.h | /** @file
MSR Definitions.
Provides defines for Machine Specific Registers(MSR) indexes. Data structures
are provided for MSRs that contain one or more bit fields. If the MSR value
returned is a single 32-bit or 64-bit value, then a data structure is not
provided for that MSR.
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
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.
@par Specification Reference:
Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3,
December 2015, Chapter 35 Model-Specific-Registers (MSR), Chapter 35.
**/
#ifndef __MSR_H__
#define __MSR_H__
#include <Register/ArchitecturalMsr.h>
#include <Register/Msr/Core2Msr.h>
#include <Register/Msr/AtomMsr.h>
#include <Register/Msr/SilvermontMsr.h>
#include <Register/Msr/NehalemMsr.h>
#include <Register/Msr/Xeon5600Msr.h>
#include <Register/Msr/XeonE7Msr.h>
#include <Register/Msr/SandyBridgeMsr.h>
#include <Register/Msr/IvyBridgeMsr.h>
#include <Register/Msr/HaswellMsr.h>
#include <Register/Msr/HaswellEMsr.h>
#include <Register/Msr/BroadwellMsr.h>
#include <Register/Msr/XeonDMsr.h>
#include <Register/Msr/SkylakeMsr.h>
#include <Register/Msr/XeonPhiMsr.h>
#include <Register/Msr/Pentium4Msr.h>
#include <Register/Msr/CoreMsr.h>
#include <Register/Msr/PentiumMMsr.h>
#include <Register/Msr/P6Msr.h>
#include <Register/Msr/PentiumMsr.h>
#endif
| Add top level MSR include file | UefiCpuPkg/Include: Add top level MSR include file
Add top level MSR include file that includes the Architecural MSR
include file and all family specific MSR files from the Msr
subdirectory
Intel(R) 64 and IA-32 Architectures Software Developer's
Manual, Volume 3, December 2015, Chapter 35
Model-Specific-Registers (MSR).
Cc: Jeff Fan <[email protected]>
Cc: Jiewen Yao <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
| C | bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 |
|
99c06cff63c4dc661b5cffc5a80f79327269684a | c/anagrams.c | c/anagrams.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
void swap(char *i, char *j) {
char saved = *i;
*i = *j;
*j = saved;
}
void generate_permutations(char* a, int n) {
if (n == 0) {
printf("%s\n", a);
} else {
for (int i = 0; i < n; i++) {
generate_permutations(a, n-1);
swap(&a[n % 2 == 0 ? 0 : i], &a[n]);
}
generate_permutations(a, n-1);
}
}
int main(int argc, const char* argv[]) {
if (argc != 2) {
fprintf(stderr, "Need exactly one argument!\n");
return 1;
}
size_t len = strlen(argv[1]);
char *word = malloc(len + 1);
word = strncpy(word, argv[1], len);
generate_permutations(word, len-1);
free(word);
return 0;
}
| #include <stdlib.h>
#include <stdio.h>
#include <string.h>
void swap(char *i, char *j) {
char saved = *i;
*i = *j;
*j = saved;
}
void generate_permutations(char* a, int n) {
if (n == 0) {
printf("%s\n", a);
} else {
for (int i = 0; i < n; i++) {
generate_permutations(a, n-1);
swap(&a[n % 2 == 0 ? 0 : i], &a[n]);
}
generate_permutations(a, n-1);
}
}
int main(int argc, const char* argv[]) {
if (argc != 2) {
fprintf(stderr, "Exactly one argument is required\n");
return 1;
}
size_t len = strlen(argv[1]);
char *word = malloc(len + 1);
word = strncpy(word, argv[1], len);
generate_permutations(word, len-1);
free(word);
return 0;
}
| Make the error message consistent with all of the other languages | Make the error message consistent with all of the other languages
| C | mit | rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot |
1b5fd56466967d0092ba489e45343d7c3317ed95 | drivers/scsi/qla2xxx/qla_version.h | drivers/scsi/qla2xxx/qla_version.h | /*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2014 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.07.00.08-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 7
#define QLA_DRIVER_PATCH_VER 0
#define QLA_DRIVER_BETA_VER 0
| /*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2014 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.07.00.16-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 7
#define QLA_DRIVER_PATCH_VER 0
#define QLA_DRIVER_BETA_VER 0
| Update the driver version to 8.07.00.16-k. | qla2xxx: Update the driver version to 8.07.00.16-k.
Signed-off-by: Giridhar Malavali <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs |
9a146e55752f9b84119fcedfabcf0dfca877610b | connection.h | connection.h | int initial_connection(char *ip_addr, int port) {
int socket_desc;
struct sockaddr_in server;
//Create socket
socket_desc = socket(AF_INET , SOCK_STREAM , 0);
if (socket_desc == -1)
{
puts("Could not create socket");
return 1;
}
server.sin_addr.s_addr = inet_addr(ip_addr); // set IP ADDRESS of server
server.sin_family = AF_INET;
server.sin_port = htons(port); // set port of chat service
//Connect to remote server
if (connect(socket_desc , (struct sockaddr *)&server , sizeof(server)) < 0)
{
puts("connect error");
return 1;
}
}
| int initial_connection(char *ip_addr, int port) {
int socket_desc;
struct sockaddr_in server;
//Create socket
socket_desc = socket(AF_INET , SOCK_STREAM , 0);
if (socket_desc == -1)
{
puts("Could not create socket");
return 1;
}
server.sin_addr.s_addr = inet_addr(ip_addr); // set IP ADDRESS of server
server.sin_family = AF_INET;
server.sin_port = htons(port); // set port of chat service
//Connect to remote server
if (connect(socket_desc , (struct sockaddr *)&server , sizeof(server)) < 0)
{
puts("connect error");
return 1;
}
}
int recieve_data(int lenght, char *message_buffer){
char server_reply[lenght];
int read_size;
// recieve packet from server
read_size = recv(socket_desc, server_reply , lenght , 0);
if (read_size > 0) {
/*
set end point string on last character by calculate read_size
In normal, recv don't clear last buffer string
So we must set end of string to prevent bug from last buffer string
*/
server_reply[read_size] = '\0';
strcpy(message_buffer, server_reply);
return 1;
}
else {
puts("Receive failed.");
return 0;
}
}
int send_data(char *text) {
return send(socket_desc , text , strlen(text) , 0) > 0;
}
| Add function recv and send | Add function recv and send
Improve function to use easier | C | mit | chin8628/terminal-s-chat |
f1482d1be22da850eee8db1e597f5c555c16e42f | src/common.c | src/common.c | /* $Id$ */
static char const _copyright[] =
"Copyright (c) 2006-2013 Pierre Pronchery <[email protected]>";
/* This file is part of DeforaOS Desktop Mailer */
static char const _license[] =
"This program is free software: you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation, version 3 of the License.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see <http://www.gnu.org/licenses/>.\n";
static char const * _authors[] =
{
"Pierre Pronchery <[email protected]>",
NULL
};
static char const * _comments =
N_("e-mail client for the DeforaOS desktop");
| /* $Id$ */
static char const _copyright[] =
"Copyright © 2006-2013 Pierre Pronchery <[email protected]>";
/* This file is part of DeforaOS Desktop Mailer */
static char const _license[] =
"This program is free software: you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation, version 3 of the License.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see <http://www.gnu.org/licenses/>.\n";
static char const * _authors[] =
{
"Pierre Pronchery <[email protected]>",
NULL
};
static char const * _comments =
N_("e-mail client for the DeforaOS desktop");
| Use the copyright character for the about dialogs | Use the copyright character for the about dialogs
| C | bsd-2-clause | DeforaOS/Mailer,DeforaOS/Mailer |
99e0edf752302fe27340e16b9d8233cd04bc2029 | lib/packet_queue.c | lib/packet_queue.c | #include "packet_queue.h"
#include "error.h"
#include "radio.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
uint32_t packet_queue_init(packet_queue_t * queue)
{
queue->head = 0;
queue->tail = 0;
return SUCCESS;
}
bool packet_queue_is_empty(packet_queue_t * queue)
{
return queue->head == queue->tail;
}
bool packet_queue_is_full(packet_queue_t * queue)
{
return abs(queue->head - queue->tail) == PACKET_QUEUE_SIZE;
}
uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet)
{
if (packet_queue_is_full(queue))
return NO_MEMORY;
memcpy(&queue->packets[0], packet, sizeof(*packet));
queue->tail++;
return SUCCESS;
}
uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet)
{
if (packet_queue_is_empty(queue))
return NOT_FOUND;
*packet = &queue->packets[queue->head];
queue->head++;
return SUCCESS;
}
| #include "packet_queue.h"
#include "error.h"
#include "radio.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
uint32_t packet_queue_init(packet_queue_t * queue)
{
queue->head = 0;
queue->tail = 0;
return SUCCESS;
}
bool packet_queue_is_empty(packet_queue_t * queue)
{
return queue->head == queue->tail;
}
bool packet_queue_is_full(packet_queue_t * queue)
{
return abs(queue->head - queue->tail) == PACKET_QUEUE_SIZE;
}
uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet)
{
if (packet_queue_is_full(queue))
return NO_MEMORY;
memcpy(&queue->packets[queue->tail], packet, sizeof(*packet));
queue->tail = (queue->tail + 1u) % PACKET_QUEUE_SIZE;
return SUCCESS;
}
uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet)
{
if (packet_queue_is_empty(queue))
return NOT_FOUND;
*packet = &queue->packets[queue->head];
queue->head = (queue->head + 1u) % PACKET_QUEUE_SIZE;
return SUCCESS;
}
| Increment head and tail properly. | Increment head and tail properly.
| C | bsd-3-clause | hlnd/nrf51-simple-radio,hlnd/nrf51-simple-radio |
73a7df9ca22086025246f5329826750b46aea81a | source/board/mtconnect04s.c | source/board/mtconnect04s.c | /**
* @file mtconnect04s.c
* @brief board ID for the MtM MtConnect04S developments board
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const char *board_id = "C005";
// URL_NAME and DRIVE_NAME must be 11 characters excluding
// the null terminated character
// Note - 4 byte alignemnt required as workaround for ARMCC compiler bug with weak references
__attribute__((aligned(4)))
const char daplink_url_name[11] = "HELP HTM";
__attribute__((aligned(4)))
const char daplink_drive_name[11] = "MTCONNEC04S";
__attribute__((aligned(4)))
const char *const daplink_target_url = "https://blog.mtmtech.com.tw/mtconnect04s/";
| /**
* @file mtconnect04s.c
* @brief board ID for the MtM MtConnect04S developments board
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const char *board_id = "C005";
// URL_NAME and DRIVE_NAME must be 11 characters excluding
// the null terminated character
// Note - 4 byte alignemnt required as workaround for ARMCC compiler bug with weak references
__attribute__((aligned(4)))
const char daplink_url_name[11] = "HELP HTM";
__attribute__((aligned(4)))
const char daplink_drive_name[11] = "MTCONNEC04S";
__attribute__((aligned(4)))
const char *const daplink_target_url = "https://developer.mbed.org/platforms/MtConnect04S/";
| Update target page url of MtConnect04S | Update target page url of MtConnect04S
| C | apache-2.0 | sg-/DAPLink,google/DAPLink-port,sg-/DAPLink,google/DAPLink-port,google/DAPLink-port,google/DAPLink-port,sg-/DAPLink |
dbd9075781f1f83ec53841c162ea027902c3742a | queue.c | queue.c | #include "queue.h"
struct Queue
{
size_t head;
size_t tail;
size_t size;
void** e;
};
Queue* Queue_Create(size_t n)
{
Queue* q = (Queue *)malloc(sizeof(Queue));
q->size = n;
q->head = q->tail = 1;
q->e = (void **)malloc(sizeof(void*) * (n + 1));
return q;
}
int Queue_Empty(Queue* q)
{
return (q->head == q->tail);
} | #include "queue.h"
struct Queue
{
size_t head;
size_t tail;
size_t size;
void** e;
};
Queue* Queue_Create(size_t n)
{
Queue* q = (Queue *)malloc(sizeof(Queue));
q->size = n;
q->head = q->tail = 1;
q->e = (void **)malloc(sizeof(void*) * (n + 1));
return q;
}
int Queue_Empty(Queue* q)
{
return (q->head == q->tail);
}
int Queue_Full(Queue* q)
{
return (q->head == q->tail + 1) || (q->head == 1 && q->tail == q->size);
} | Add helper function Queue Full implementation | Add helper function Queue Full implementation
| C | mit | MaxLikelihood/CADT |
e3cdcbbbfd75cd76d705bee7c01ea07cced618cb | shell.c | shell.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "parsing.h"
#include "shutility.h"
int main(int argc, char **argv)
{
int status = 1;
int read;
size_t len;
char *buffer = NULL;
printf("----- C O N S O L E\t S I M U L A T I O N -----\n\n");
while (status) {
/* Get & display username and hostname */
display_info();
/* Get user input, strtok to remove newline */
read = getline(&buffer, &len, stdin);
strtok(buffer, "\n");
status = parsing(buffer);
}
if (read)
free(buffer);
return 0;
} | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "parsing.h"
#include "shutility.h"
/*
void sig_handler(int signo)
{
if (signo == SIGUSR1)
printf("Received SIGUSR1\n");
else if (signo == SIGTERM)
printf("Received SIGTERM\n");
else if (signo == SIGINT)
printf("Received SIGINT\n");
else if (signo == SIGFPE)
printf("Received SIGFPE\n");
else if (signo == SIGABRT)
printf("Received SIGABRT\n");
}
*/
int main(int argc, char **argv)
{
int status = 1;
int read;
size_t len;
char *buffer = NULL;
/* Example of signal handling
*
*if (signal(SIGUSR1, sig_handler) == SIG_ERR)
* printf("\ncan't catch SIGUSR1\n");
*if (signal(SIGTERM, sig_handler) == SIG_ERR)
* printf("\ncan't catch SIGTERM\n");
*if (signal(SIGINT, sig_handler) == SIG_ERR)
* printf("\ncan't catch SIGINT\n");
*if (signal(SIGFPE, sig_handler) == SIG_ERR)
* printf("\ncan't catch SIGFPE\n");
*if (signal(SIGABRT, sig_handler) == SIG_ERR)
* printf("\ncan't catch SIGABRT\n");
*/
printf("----- C O N S O L E\t S I M U L A T I O N -----\n\n");
while (status) {
/* Get & display username and hostname */
display_info();
/* Get user input, strtok to remove newline */
read = getline(&buffer, &len, stdin);
strtok(buffer, "\n");
status = parsing(buffer);
}
if (read)
free(buffer);
return 0;
} | Add example of signal handling | Add example of signal handling
| C | mit | Bcoolie/Shell-Simulation |
ce8db655cff33b744df07e338e328fb598a5a81c | snake.c | snake.c | #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
#define BOARD_HEIGHT 50
#define BOARD_WIDTH 50
typedef struct Position {
int row;
int col;
} Position;
int main() {
return EXIT_SUCCESS;
}
| #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
#define BOARD_HEIGHT 50
#define BOARD_WIDTH 50
typedef struct Position {
int row;
int col;
} Position;
typedef enum Cell {
EMPTY
,SNAKE
,FOOD
} Cell;
int main() {
return EXIT_SUCCESS;
}
| Enumerate possible values for cells. | Enumerate possible values for cells.
| C | mit | Hendrikto/Snake |
515a641dacc9b445826646263f92bb4148963a25 | test/CFrontend/2005-02-20-AggregateSAVEEXPR.c | test/CFrontend/2005-02-20-AggregateSAVEEXPR.c | // RUN: %llvmgcc %s -o /dev/null -S
// Note:
// We fail this on Sparc because the C library seems to be missing complex.h
// and the corresponding C99 complex support.
//
// We could modify the test to use only GCC extensions, but I don't know if
// that would change the nature of the test.
//
// XFAIL: sparc
#include <complex.h>
int foo(complex float c) {
return creal(c);
}
| // RUN: %llvmgcc %s -o /dev/null -S
// Note:
// We fail this on Sparc because the C library seems to be missing complex.h
// and the corresponding C99 complex support.
//
// We could modify the test to use only GCC extensions, but I don't know if
// that would change the nature of the test.
//
// XFAIL: sparc
#ifdef __CYGWIN__
#include <mingw/complex.h>
#else
#include <complex.h>
#endif
int foo(complex float c) {
return creal(c);
}
| Make this testcase compatible with CYGWIN. | Make this testcase compatible with CYGWIN.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@44353 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm |
126b631e22915e43dc41a6a62e6d29c88d9afc19 | test/test_parser_empty.c | test/test_parser_empty.c | #include "test_parser_p.h"
void empty_success(void **state) {
grammar_t *grammar = grammar_init(
non_terminal("Start"),
rule_init("Start", empty()), 1);
parse_t *result = parse("hello", grammar);
assert_non_null(result);
assert_int_equal(result->length, 0);
assert_int_equal(result->n_children, 0);
}
| #include "test_parser_p.h"
void empty_success(void **state) {
grammar_t *grammar = grammar_init(
non_terminal("Start"),
rule_init("Start", empty()), 1);
parse_result_t *result = parse("hello", grammar);
assert_non_null(result);
parse_t *suc = result->data.result;
assert_int_equal(suc->length, 0);
assert_int_equal(suc->n_children, 0);
}
| Use new API on empty tests | Use new API on empty tests
| C | mit | Baltoli/peggo,Baltoli/peggo |
9819e6f6db1beec8053584002d9573c496b17ea7 | test/test-file.c | test/test-file.c | #include <glib.h>
#include <glib/gstdio.h>
#include <uuid/uuid.h>
#include <wizbit/file.h>
char *work_dir = "/tmp/wizbittest";
int main()
{
system ("rm -rf /tmp/wizbittest");
mkdir (work_dir,0700);
chdir (work_dir);
{
struct wiz_file *file;
wiz_vref vref;
FILE *fp;
file = wiz_file_open(WIZ_FILE_NEW, 0, 0);
fp = wiz_file_get_handle(file);
wiz_file_snapshot(file, vref);
wiz_file_close(file);
}
return 0;
}
| #include <glib.h>
#include <glib/gstdio.h>
#include <uuid/uuid.h>
#include <wizbit/file.h>
char *work_dir = "/tmp/wizbittest";
int main()
{
system ("rm -rf /tmp/wizbittest");
mkdir (work_dir,0700);
chdir (work_dir);
{
struct wiz_file *file;
wiz_vref vref;
FILE *fp;
file = wiz_file_open(WIZ_FILE_NEW, 0, 0);
fp = wiz_file_get_handle(file);
fprintf(fp, "I BELIEVE");
wiz_file_snapshot(file, vref);
wiz_file_close(file);
}
return 0;
}
| Test writing to temp file and making a snapshot | Test writing to temp file and making a snapshot
| C | lgpl-2.1 | wizbit-archive/wizbit,wizbit-archive/wizbit |
417ad97a5325870634f1b8edb1bf1223c28a757a | test.c | test.c | #include <stdio.h>
#include <stdlib.h>
typedef struct State State;
struct State
{
char c;
State *out;
};
typedef struct List List;
struct List
{
State *s;
};
State *State_new(char c, State *out)
{
State *s;
s = malloc(sizeof(*s));
s->c = c;
s->out = out;
return s;
}
void *List_new(State **outpp)
{
List *slist = malloc(sizeof(*slist));
slist->s = *outpp;
return slist;
}
int main()
{
State *a = State_new('a', NULL);
List *l = List_new(&(a->out));
/* This printf() will result in a seg fault, since a->out is NULL. */
//printf("%c\n", a->out->c);
/* change what State struct is pointed to by l */
l->s = State_new('b', NULL);
/* why is this not b? */
//printf("%c\n", a->out->c);
return 0;
}
| Test code to simplify error | Test code to simplify error
| C | mit | ggundersen/re |
|
5c8bed619e318e12f883f2e1df4773be68cae334 | src/gamemaps_parser.h | src/gamemaps_parser.h | #ifndef GAMEMAPS_PARSER_H
#define GAMEMAPS_PARSER_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
///
/// Parses content of the map header file.
///
/// \return `true` if successful, `false` otherwise
///
bool parse_map_header(
uint8_t *header, ///< [in] The content of the map header file
size_t length, ///< [in] The length of the map header file
uint32_t *level_pointers, ///< [out] The level pointers array
size_t *level_pointers_length ///< [out] The length of the level pointers array
);
#endif
| #ifndef GAMEMAPS_PARSER_H
#define GAMEMAPS_PARSER_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
///
/// A structure representing a plane
///
typedef struct {
uint16_t *data; ///< Plane data
size_t length; ///< The length of the plane data
} plane_t;
///
/// A structure representing a level
///
typedef struct {
plane_t *planes; ///< Planes
size_t planes_num; ///< The number of planes
uint16_t width; ///< The width of the level
uint16_t height; ///< The height of the level
uint8_t name[16]; ///< The name of the level
} level_t;
///
/// A structure representing map data
///
typedef struct {
level_t *levels; ///< Levels
size_t levels_num; ///< The number of levels
} map_data_t;
///
/// Parses content of the map header file.
///
/// \return `true` if successful, `false` otherwise
///
bool parse_map_header(
uint8_t *header, ///< [in] The content of the map header file
size_t length, ///< [in] The length of the map header file
uint32_t *level_pointers, ///< [out] The level pointers array
size_t *level_pointers_length ///< [out] The length of the level pointers array
);
///
/// Parses content of the map data file.
///
/// \return `true` if successful, `false` otherwise
///
bool parse_map_data(
uint8_t *data, ///< [in] Raw map data
size_t data_length, ///< [in] The length of the raw map data
map_data_t *map_data ///< [out] Parsed map data
);
#endif
| Add some definitions required for parsing map data | Add some definitions required for parsing map data
| C | mit | Xiyng/gamemaps-parser,Xiyng/gamemaps-parser |
2bc87f4dd510a5d3e7f255de3af0e68042af60e9 | messagebox.c | messagebox.c | #include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <windows.h>
#define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\
(v=vs.85).aspx"
#define VERSION "0.1.0"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine,
int nCmdShow)
{
LPWSTR *szArgList;
int argCount;
szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
if (szArgList == NULL) {
fprintf(stderr, "Unable to parse the command line.\n");
return 255;
}
if (argCount < 3 || argCount > 4) {
fprintf(stderr, "Batch MessageBox v" VERSION "\n");
fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]);
fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n"
URL "\nfor the possible values of \"type\". "
"ERRORLEVEL is the return value or 255 on\nerror.\n");
return 255;
}
/* Ignore _wtoi errors. */
int type = _wtoi(szArgList[3]);
int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type);
LocalFree(szArgList);
return button;
}
| #undef __STRICT_ANSI__
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <windows.h>
#define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\
(v=vs.85).aspx"
#define VERSION "0.1.0"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine,
int nCmdShow)
{
LPWSTR *szArgList;
int argCount;
szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
if (szArgList == NULL) {
fprintf(stderr, "Unable to parse the command line.\n");
return 255;
}
if (argCount < 3 || argCount > 4) {
fprintf(stderr, "Batch MessageBox v" VERSION "\n");
fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]);
fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n"
URL "\nfor the possible values of \"type\". "
"ERRORLEVEL is the return value or 255 on\nerror.\n");
return 255;
}
/* Ignore _wtoi errors. */
int type = _wtoi(szArgList[3]);
int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type);
LocalFree(szArgList);
return button;
}
| Fix warning about implicit declaration of _wtoi() | Fix warning about implicit declaration of _wtoi()
Per http://0mg.hatenadiary.jp/entry/2015/08/25/172457.
| C | mit | dbohdan/messagebox,dbohdan/messagebox |
6888f7293c815a4cd4c313c1a9bf57cc95f7d043 | Pod/Classes/MapperMacros/VOKManagedObjectMapperMacros.h | Pod/Classes/MapperMacros/VOKManagedObjectMapperMacros.h | //
// VOKManagedObjectMapperMacros.h
// Vokoder
//
// Copyright © 2016 Vokal.
//
#ifndef VOKManagedObjectMapperMacros_h
#define VOKManagedObjectMapperMacros_h
#import "VOKManagedObjectMap.h"
#import <VOKKeyPathHelper.h>
/**
* Creates a map with the default date mapper.
*
* @param inputKeyPath The foreign key to match with the local key.
* @param coreDataSelectorSymbol The local selector symbol.
* @param klass The class on which the local selector symbol is defined.
*
* @return A VOKManagedObjectMap
*/
#ifndef VOKMapForeignToLocalClassProperty
# define VOKMapForeignToLocalClassProperty(inputKeyPath, klass, coreDataSelectorSymbol) \
[VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOKKeyForInstanceOf(klass, coreDataSelectorSymbol)]
#endif
/**
* Creates a map with the default date mapper.
*
* @param inputKeyPath The foreign key to match with the local key.
* @param coreDataSelectorSymbol The local selector symbol on the class of self.
*
* @return A VOKManagedObjectMap
*/
#ifndef VOKMapForeignToLocalForSelf
# define VOKMapForeignToLocalForSelf(inputKeyPath, coreDataSelectorSymbol) \
[VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOKKeyForSelf(coreDataSelectorSymbol)]
#endif
#endif /* VOKManagedObjectMapperMacros_h */
| //
// VOKManagedObjectMapperMacros.h
// Vokoder
//
// Copyright © 2016 Vokal.
//
#ifndef VOKManagedObjectMapperMacros_h
#define VOKManagedObjectMapperMacros_h
#import "VOKManagedObjectMap.h"
#import <VOKUtilities/VOKKeyPathHelper.h>
/**
* Creates a map with the default date mapper.
*
* @param inputKeyPath The foreign key to match with the local key.
* @param coreDataSelectorSymbol The local selector symbol.
* @param klass The class on which the local selector symbol is defined.
*
* @return A VOKManagedObjectMap
*/
#ifndef VOKMapForeignToLocalClassProperty
# define VOKMapForeignToLocalClassProperty(inputKeyPath, klass, coreDataSelectorSymbol) \
[VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOKKeyForInstanceOf(klass, coreDataSelectorSymbol)]
#endif
/**
* Creates a map with the default date mapper.
*
* @param inputKeyPath The foreign key to match with the local key.
* @param coreDataSelectorSymbol The local selector symbol on the class of self.
*
* @return A VOKManagedObjectMap
*/
#ifndef VOKMapForeignToLocalForSelf
# define VOKMapForeignToLocalForSelf(inputKeyPath, coreDataSelectorSymbol) \
[VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOKKeyForSelf(coreDataSelectorSymbol)]
#endif
#endif /* VOKManagedObjectMapperMacros_h */
| Include VOKKeyPathHelper.h as a module header | Include VOKKeyPathHelper.h as a module header
| C | mit | vokal/Vokoder,vokal/Vokoder,designatednerd/Vokoder,vokal/Vokoder,designatednerd/Vokoder,brockboland/Vokoder,brockboland/Vokoder,brockboland/Vokoder,designatednerd/Vokoder,vokal/Vokoder,designatednerd/Vokoder,brockboland/Vokoder,brockboland/Vokoder |
ad42e08ce166b18f20f0346c5a2bb6a6f107c5fb | integer-multiplication/recursive.c | integer-multiplication/recursive.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
int* toInt(char * s, int len){
int * arr = malloc(sizeof(char) * len);
int i = 0;
for(i = 0; i < len; i++) {
arr[i] = s[i] - '0';
}
return arr;
}
int main(int argc, char *argv[]) {
int n1_len = strlen(argv[1]);
int n2_len = strlen(argv[2]);
int * n1 = toInt(argv[1], n1_len);
int * n2 = toInt(argv[2], n2_len);
free(n2);
free(n1);
return 0;
} | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
int* toInt(char * s, int len){
int * arr = malloc(sizeof(int) * len);
int i = 0;
for(i = 0; i < len; i++) {
arr[i] = s[i] - '0';
}
return arr;
}
int** getabcd(int *arr1, int *arr2, int len1, int len2){
int i,j;
int *a = malloc(sizeof(int*) * (len1 / 2));
int *b = malloc(sizeof(int*) * (len1 / 2 + (len1 % 2)));
int *c = malloc(sizeof(int*) * (len2 / 2));
int *d = malloc(sizeof(int*) * (len2 / 2 + (len2 % 2)));
int **abcd = malloc(sizeof(int*) * 4);
for(i = 0; i < len1/2; i++){
a[i] = arr1[i];
b[i] = arr1[i+len1/2];
}
if (len1 % 2) {
b[i] = arr1[len1 - 1];
}
for(i = 0; i < len2/2; i++){
c[i] = arr2[i];
d[i] = arr2[i+len2/2];
}
if (len2 % 2) {
d[i] = arr2[len2 - 1];
}
abcd = (int*[4]){a,b,c,d};
return abcd;
}
int main(int argc, char *argv[]) {
int n1_len = strlen(argv[1]);
int n2_len = strlen(argv[2]);
int * n1 = toInt(argv[1], n1_len);
int * n2 = toInt(argv[2], n2_len);
int i,j;
int **abcd = getabcd(n1, n2, n1_len, n2_len);
free(n2);
free(n1);
return 0;
} | Split int arrays into 4 smaller int arrays | Split int arrays into 4 smaller int arrays
Managed to split int arrays into 4 smaller int arrays representing
a, b, c, and d, and return as an array of these 4 arrays. Am not
sure this is the best way to go about this anymore...
| C | mit | timpel/stanford-algs,timpel/stanford-algs |
5c110dd17a8e122bf2fe297c41b30e848e934549 | src/runtime/main.c | src/runtime/main.c | #include <stdio.h>
#include <string.h>
#include <time.h>
#include <orbit/orbit.h>
int main(int argc, const char** argv) {
if(argc < 2) {
fprintf(stderr, "error: no input module file.\n");
return -1;
}
OrbitVM* vm = orbit_vmNew();
if(orbit_vmInvoke(vm, argv[1], "main")) {
fprintf(stderr, "error: interpreter error\n");
}
orbit_vmDealloc(vm);
} | #include <stdio.h>
#include <string.h>
#include <time.h>
#include <orbit/orbit.h>
int main(int argc, const char** argv) {
if(argc < 2) {
fprintf(stderr, "error: no input module file.\n");
return -1;
}
OrbitVM* vm = orbit_vmNew();
if(!orbit_vmInvoke(vm, argv[1], "main")) {
fprintf(stderr, "error: interpreter error\n");
}
orbit_vmDealloc(vm);
} | Fix wrong success check in runtime cli | Fix wrong success check in runtime cli
| C | mit | amyinorbit/orbitvm,amyinorbit/orbitvm,cesarparent/orbitvm,amyinorbit/orbitvm,cesarparent/orbitvm |
7f5209ef7f14dee23044de2c9aa738b646271004 | iv/lv5/breaker/mono_ic.h | iv/lv5/breaker/mono_ic.h | // MonoIC compiler
#ifndef IV_BREAKER_MONO_IC_H_
#define IV_BREAKER_MONO_IC_H_
namespace iv {
namespace lv5 {
namespace breaker {
class MonoIC {
};
} } } // namespace iv::lv5::breaker
#endif // IV_BREAKER_MONO_IC_H_
| Add initial MonoIC compiler file | Add initial MonoIC compiler file
| C | bsd-2-clause | Constellation/iv,Constellation/iv,Constellation/iv,Constellation/iv |
|
5f1a5c7f57ce37e4fd6cca09d3c03ce9a34b6282 | include/llvm/Target/TargetSelect.h | include/llvm/Target/TargetSelect.h | //===- TargetSelect.h - Target Selection & Registration -------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file provides utilities to make sure that certain classes of targets are
// linked into the main application executable, and initialize them as
// appropriate.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TARGET_TARGETSELECT_H
#define LLVM_TARGET_TARGETSELECT_H
#include "llvm/Config/config.h"
namespace llvm {
// Declare all of the target-initialization functions that are available.
#define LLVM_TARGET(TargetName) void Initialize##TargetName##Target();
#include "llvm/Config/Targets.def"
// Declare all of the available asm-printer initialization functions.
// Declare all of the target-initialization functions.
#define LLVM_ASM_PRINTER(TargetName) void Initialize##TargetName##AsmPrinter();
#include "llvm/Config/AsmPrinters.def"
/// InitializeAllTargets - The main program should call this function if it
/// wants to link in all available targets that LLVM is configured to support.
inline void InitializeAllTargets() {
#define LLVM_TARGET(TargetName) llvm::Initialize##TargetName##Target();
#include "llvm/Config/Targets.def"
}
/// InitializeAllAsmPrinters - The main program should call this function if
/// it wants all asm printers that LLVM is configured to support. This will
/// cause them to be linked into its executable.
inline void InitializeAllAsmPrinters() {
#define LLVM_ASM_PRINTER(TargetName) Initialize##TargetName##AsmPrinter();
#include "llvm/Config/AsmPrinters.def"
}
/// InitializeNativeTarget - The main program should call this function to
/// initialize the native target corresponding to the host. This is useful
/// for JIT applications to ensure that the target gets linked in correctly.
inline bool InitializeNativeTarget() {
// If we have a native target, initialize it to ensure it is linked in.
#ifdef LLVM_NATIVE_ARCH
#define DoInit2(TARG, MOD) llvm::Initialize ## TARG ## MOD()
#define DoInit(T, M) DoInit2(T, M)
DoInit(LLVM_NATIVE_ARCH, Target);
return false;
#undef DoInit
#undef DoInit2
#else
return true;
#endif
}
}
#endif
| Add a utility header that makes it easy to link in the right set of targets for various purposes. | Add a utility header that makes it easy to link in the right set
of targets for various purposes.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@73610 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap |
|
954ca58264801b7a4cac4b3bc53d0bd01feaca92 | include/GL.h | include/GL.h | #ifndef _GL_H_
#define _GL_H_
#if defined __APPLE__
#include <OpenGLES/ES3/gl.h>
#include <OpenGLES/ES3/glext.h>
#elif defined GL_ES
#include <GLES3/gl3.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#else
#define GL_GLEXT_PROTOTYPES
#ifdef WIN32
#include <GL/glew.h>
#include <windows.h>
#endif
#ifdef __ANDROID__
#include <GLES3/gl3.h>
#include <GLES3/gl3ext.h>
#else
#include <GL/gl.h>
#ifdef _WIN32
#include "../system/win32/glext.h"
#else
#include <GL/glext.h>
#endif
#endif
#endif
#endif
| #ifndef _GL_H_
#define _GL_H_
#if defined __APPLE__
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#elif defined GL_ES
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <importgl.h>
#else
//#define GL_GLEXT_PROTOTYPES
#ifdef WIN32
#include <GL/glew.h>
#include <windows.h>
#endif
#ifdef __ANDROID__
#include <importgl.h>
#else
#include <GL/gl.h>
#ifdef _WIN32
#include "../system/win32/glext.h"
#else
#include <GL/glext.h>
#endif
#endif
#endif
#endif
| Remove gl includes from __ANDROID__ | Remove gl includes from __ANDROID__ | C | mit | Sometrik/framework,Sometrik/framework,Sometrik/framework |
307265aaabc5d61e1aa3add68f87911e003a85fa | support/c/idris_directory.h | support/c/idris_directory.h | #ifndef __IDRIS_DIRECTORY_H
#define __IDRIS_DIRECTORY_H
char* idris2_currentDirectory();
int idris2_changeDir(char* dir);
int idris2_createDir(char* dir);
void* idris2_openDir(char* dir);
void idris2_dirClose(void* d);
char* idris2_nextDirEntry(void* d);
#endif
| #ifndef __IDRIS_DIRECTORY_H
#define __IDRIS_DIRECTORY_H
char* idris2_currentDirectory();
int idris2_changeDir(char* dir);
int idris2_createDir(char* dir);
void* idris2_openDir(char* dir);
void idris2_closeDIr(void* d);
int idris2_removeDir(char* path);
char* idris2_nextDirEntry(void* d);
#endif
| Update C support header files | Update C support header files
| C | bsd-3-clause | mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm |
5b1265c575dcaa7f8d424f7e6cfdb956ee048dff | src/Methcla/Utility/Macros.h | src/Methcla/Utility/Macros.h | // Copyright 2012-2013 Samplecount S.L.
//
// 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 METHCLA_UTILITY_MACROS_H_INCLUDED
#define METHCLA_UTILITY_MACROS_H_INCLUDED
#if defined(__GNUC__)
# define METHCLA_WITHOUT_WARNINGS_BEGIN \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
_Pragma("GCC diagnostic ignored \"-Wunused-private-field\"")
# define METHCLA_WITHOUT_WARNINGS_END _Pragma("GCC diagnostic pop")
#else
# define METHCLA_WITHOUT_WARNINGS_BEGIN
# define METHCLA_WITHOUT_WARNINGS_END
#endif
#endif // METHCLA_UTILITY_MACROS_H_INCLUDED
| // Copyright 2012-2013 Samplecount S.L.
//
// 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 METHCLA_UTILITY_MACROS_H_INCLUDED
#define METHCLA_UTILITY_MACROS_H_INCLUDED
#if defined(__GNUC__)
# if __GNUC__ > 4
# define METHCLA_WITHOUT_WARNINGS_BEGIN \
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wunused-parameter\"") \
_Pragma("GCC diagnostic ignored \"-Wunused-private-field\"")
# define METHCLA_WITHOUT_WARNINGS_END _Pragma("GCC diagnostic pop")
# else
# define METHCLA_WITHOUT_WARNINGS_BEGIN \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
# define METHCLA_WITHOUT_WARNINGS_END _Pragma("GCC diagnostic pop")
# endif
#else
# define METHCLA_WITHOUT_WARNINGS_BEGIN
# define METHCLA_WITHOUT_WARNINGS_END
#endif
#endif // METHCLA_UTILITY_MACROS_H_INCLUDED
| Remove -Wunused-private-field from pragma for gcc <= 4 | Remove -Wunused-private-field from pragma for gcc <= 4
| C | apache-2.0 | samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla |
6bc5a1e26fadb438c8363d60b7d60a790870c3c2 | test2/structs/lvalue/cant.c | test2/structs/lvalue/cant.c | // RUN: %check -e %s
main()
{
struct A
{
int i;
} a, b, c;
a = b ? : c; // CHECK: error: struct involved in if-expr
}
| // RUN: %check -e %s
main()
{
struct A
{
int i;
} a, b, c;
a = b ? : c; // CHECK: error: struct involved in ?:
}
| Fix struct if-expression test warning | Fix struct if-expression test warning
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
793459cf8a68ef3e596211bc81d8003880d1d6ba | Application/MIDASDesktop/GUI/ResourceEdit.h | Application/MIDASDesktop/GUI/ResourceEdit.h | #ifndef __ResourceEdit_H
#define __ResourceEdit_H
#include "midasLogAware.h"
#include "midasResourceDescTable.h"
#include <QObject>
class midasDatabaseProxy;
class QTableWidgetItem;
namespace mdo {
class Community;
class Collection;
class Item;
class Bitstream;
};
class ResourceEdit : public QObject, public midasLogAware
{
Q_OBJECT
public:
ResourceEdit(midasDatabaseProxy* database);
~ResourceEdit();
void Save(QTableWidgetItem* row);
signals:
void DataModified(std::string uuid);
protected:
void SaveCommunity(mdo::Community*, MIDASFields, std::string data);
void SaveCollection(mdo::Collection*, MIDASFields, std::string data);
void SaveItem(mdo::Item*, MIDASFields, std::string data);
void SaveBitstream(mdo::Bitstream*, MIDASFields, std::string data);
midasDatabaseProxy* m_database;
};
#endif | #ifndef __ResourceEdit_H
#define __ResourceEdit_H
#include "midasLogAware.h"
#include "MidasResourceDescTable.h"
#include <QObject>
class midasDatabaseProxy;
class QTableWidgetItem;
namespace mdo {
class Community;
class Collection;
class Item;
class Bitstream;
};
class ResourceEdit : public QObject, public midasLogAware
{
Q_OBJECT
public:
ResourceEdit(midasDatabaseProxy* database);
~ResourceEdit();
void Save(QTableWidgetItem* row);
signals:
void DataModified(std::string uuid);
protected:
void SaveCommunity(mdo::Community*, MIDASFields, std::string data);
void SaveCollection(mdo::Collection*, MIDASFields, std::string data);
void SaveItem(mdo::Item*, MIDASFields, std::string data);
void SaveBitstream(mdo::Bitstream*, MIDASFields, std::string data);
midasDatabaseProxy* m_database;
};
#endif | Fix wrong case bug causing compile error on unix platforms | BUG: Fix wrong case bug causing compile error on unix platforms
SVN-Revision: 2901
| C | apache-2.0 | cpatrick/MidasClient,cpatrick/MidasClient,cpatrick/MidasClient |
5c52d60804ea39834ef024923d4286fb7464eefa | ir/ana/execfreq_t.h | ir/ana/execfreq_t.h | /*
* This file is part of libFirm.
* Copyright (C) 2012 University of Karlsruhe.
*/
/**
* @file
* @brief Compute an estimate of basic block executions.
* @author Adam M. Szalkowski
* @date 28.05.2006
*/
#ifndef FIRM_ANA_EXECFREQ_T_H
#define FIRM_ANA_EXECFREQ_T_H
#include "execfreq.h"
void init_execfreq(void);
void exit_execfreq(void);
void set_block_execfreq(ir_node *block, double freq);
typedef struct ir_execfreq_int_factors {
double max;
double min_non_zero;
double m, b;
} ir_execfreq_int_factors;
void ir_calculate_execfreq_int_factors(ir_execfreq_int_factors *factors,
ir_graph *irg);
int get_block_execfreq_int(const ir_execfreq_int_factors *factors,
const ir_node *block);
#endif
| /*
* This file is part of libFirm.
* Copyright (C) 2012 University of Karlsruhe.
*/
/**
* @file
* @brief Compute an estimate of basic block executions.
* @author Adam M. Szalkowski
* @date 28.05.2006
*/
#ifndef FIRM_ANA_EXECFREQ_T_H
#define FIRM_ANA_EXECFREQ_T_H
#include "execfreq.h"
void init_execfreq(void);
void exit_execfreq(void);
void set_block_execfreq(ir_node *block, double freq);
typedef struct ir_execfreq_int_factors {
double min_non_zero;
double m, b;
} ir_execfreq_int_factors;
void ir_calculate_execfreq_int_factors(ir_execfreq_int_factors *factors,
ir_graph *irg);
int get_block_execfreq_int(const ir_execfreq_int_factors *factors,
const ir_node *block);
#endif
| Remove unused attribute max from int_factors. | execfreq: Remove unused attribute max from int_factors.
| C | lgpl-2.1 | MatzeB/libfirm,jonashaag/libfirm,libfirm/libfirm,killbug2004/libfirm,killbug2004/libfirm,libfirm/libfirm,jonashaag/libfirm,8l/libfirm,jonashaag/libfirm,killbug2004/libfirm,MatzeB/libfirm,davidgiven/libfirm,libfirm/libfirm,davidgiven/libfirm,davidgiven/libfirm,killbug2004/libfirm,killbug2004/libfirm,davidgiven/libfirm,davidgiven/libfirm,MatzeB/libfirm,libfirm/libfirm,killbug2004/libfirm,killbug2004/libfirm,davidgiven/libfirm,8l/libfirm,jonashaag/libfirm,jonashaag/libfirm,MatzeB/libfirm,8l/libfirm,MatzeB/libfirm,libfirm/libfirm,davidgiven/libfirm,8l/libfirm,jonashaag/libfirm,MatzeB/libfirm,8l/libfirm,MatzeB/libfirm,jonashaag/libfirm,8l/libfirm,8l/libfirm |
74201b3f0de435b167786fe31159f9217e860a79 | Lagrangian/L3TestResult.h | Lagrangian/L3TestResult.h | // L3TestResult.h
// Created by Rob Rix on 2012-11-12.
// Copyright (c) 2012 Rob Rix. All rights reserved.
#import <Foundation/Foundation.h>
@interface L3TestResult : NSObject
+(instancetype)testResultWithName:(NSString *)name startDate:(NSDate *)startDate;
@property (strong, nonatomic) L3TestResult *parent; // this really only exists to make stacks easier; nil it out on pop or you get retain cycles
@property (copy, nonatomic, readonly) NSString *name;
@property (strong, nonatomic, readonly) NSDate *startDate;
@property (assign, nonatomic) NSTimeInterval duration;
@property (assign, nonatomic) NSUInteger testCaseCount;
@property (assign, nonatomic) NSUInteger assertionCount;
@property (assign, nonatomic) NSUInteger assertionFailureCount;
@property (assign, nonatomic) NSUInteger exceptionCount;
@property (nonatomic, readonly) bool succeeded;
@property (nonatomic, readonly) bool failed;
@property (nonatomic, readonly) NSArray *testResults;
-(void)addTestResult:(L3TestResult *)testResult;
@end
| // L3TestResult.h
// Created by Rob Rix on 2012-11-12.
// Copyright (c) 2012 Rob Rix. All rights reserved.
#import <Foundation/Foundation.h>
@interface L3TestResult : NSObject
+(instancetype)testResultWithName:(NSString *)name startDate:(NSDate *)startDate;
@property (strong, nonatomic) L3TestResult *parent; // this really only exists to make stacks easier; nil it out on pop or you get retain cycles
@property (copy, nonatomic, readonly) NSString *name;
@property (strong, nonatomic, readonly) NSDate *startDate;
@property (strong, nonatomic) NSDate *endDate;
@property (assign, nonatomic) NSTimeInterval duration;
@property (assign, nonatomic) NSUInteger testCaseCount;
@property (assign, nonatomic) NSUInteger assertionCount;
@property (assign, nonatomic) NSUInteger assertionFailureCount;
@property (assign, nonatomic) NSUInteger exceptionCount;
@property (nonatomic, readonly) bool succeeded;
@property (nonatomic, readonly) bool failed;
@property (nonatomic, readonly) NSArray *testResults;
-(void)addTestResult:(L3TestResult *)testResult;
@end
| Test results have an end date. | Test results have an end date.
| C | bsd-3-clause | ashfurrow/RXCollections,robrix/RXCollections,policp/RXCollections,ashfurrow/RXCollections,robrix/RXCollections,policp/RXCollections,robrix/Lagrangian,robrix/Lagrangian,robrix/RXCollections,robrix/Lagrangian,policp/RXCollections |
eebacb19cbe5109354aa877ba4c83b79164cfc5c | examples/foo.h | examples/foo.h | /* -*- C++ -*- */
#ifndef FOO_H_
# define FOO_H_
#include <string>
int print_something(const char *message);
int print_something_else(const char *message2);
class SomeObject
{
std::string m_prefix;
public:
SomeObject (std::string const prefix)
: m_prefix (prefix) {}
int add_prefix (std::string& message) {
message = m_prefix + message;
return message.size();
}
};
#endif /* !FOO_H_ */
| // -*- Mode: C++; c-file-style: "stroustrup"; indent-tabs-mode:nil; -*-
#ifndef FOO_H_
# define FOO_H_
#include <string>
// Yes, this code is stupid, I know; it is only meant as an example!
int print_something(const char *message);
int print_something_else(const char *message2);
class Foo
{
std::string m_datum;
public:
Foo () : m_datum ("")
{}
Foo (std::string datum) : m_datum (datum)
{}
std::string get_datum () const { return m_datum; }
Foo (Foo const & other) : m_datum (other.get_datum ())
{}
};
class Bar : public Foo
{
};
class SomeObject
{
std::string m_prefix;
Foo m_foo_value;
Foo *m_foo_ptr;
Foo *m_foo_shared_ptr;
public:
SomeObject (std::string const prefix)
: m_prefix (prefix), m_foo_ptr (0),
m_foo_shared_ptr (0)
{}
int add_prefix (std::string& message) {
message = m_prefix + message;
return message.size ();
}
// pass by value, direction=in
void set_foo_value (Foo foo) {
m_foo_value = foo;
}
// pass by reference, direction=in
void set_foo_ref (Foo& foo) {
m_foo_value = foo;
}
// pass by reference, direction=out
void peek_foo_ref (Foo& foo) {
foo = m_foo_value;
}
// pass by pointer, direction=in, transfers ownership
void set_foo_ptr (Foo *foo) {
if (m_foo_ptr)
delete m_foo_ptr;
m_foo_ptr = foo;
}
// pass by pointer, direction=in, doesn't transfer ownership
void set_foo_shared_ptr (Foo *foo) {
m_foo_shared_ptr = foo;
}
// return value
Foo get_foo_value () {
return m_foo_value;
}
// return pointer, caller doesn't own return
Foo * get_foo_shared_ptr () {
return m_foo_shared_ptr;
}
// return pointer, caller owns return
Foo * get_foo_ptr () {
Foo *foo = m_foo_ptr;
m_foo_ptr = NULL;
return foo;
}
};
#endif /* !FOO_H_ */
| Add example interfaces to test a bunch of new stuff (c++ subclassing, class parameter handling) | Add example interfaces to test a bunch of new stuff (c++ subclassing, class parameter handling) | C | lgpl-2.1 | cawka/pybindgen-old,cawka/pybindgen-old,gjcarneiro/pybindgen,gjcarneiro/pybindgen,gjcarneiro/pybindgen,ftalbrecht/pybindgen,gjcarneiro/pybindgen,ftalbrecht/pybindgen,ftalbrecht/pybindgen,ftalbrecht/pybindgen,cawka/pybindgen-old,cawka/pybindgen-old |
837f1bd12b5c80446bf0ee243303c66d37c6a69e | ndb/src/common/portlib/NdbSleep.c | ndb/src/common/portlib/NdbSleep.c | /* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <NdbSleep.h>
int
NdbSleep_MilliSleep(int milliseconds){
int result = 0;
struct timespec sleeptime;
sleeptime.tv_sec = milliseconds / 1000;
sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
result = nanosleep(&sleeptime, NULL);
return result;
}
int
NdbSleep_SecSleep(int seconds){
int result = 0;
result = sleep(seconds);
return result;
}
| /* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <my_sys.h>
#include <NdbSleep.h>
int
NdbSleep_MilliSleep(int milliseconds){
my_sleep(milliseconds*1000);
return 0;
#if 0
int result = 0;
struct timespec sleeptime;
sleeptime.tv_sec = milliseconds / 1000;
sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
result = nanosleep(&sleeptime, NULL);
return result;
#endif
}
int
NdbSleep_SecSleep(int seconds){
int result = 0;
result = sleep(seconds);
return result;
}
| Use my_sleep instead of nanosleep for portability | Use my_sleep instead of nanosleep for portability
| C | lgpl-2.1 | ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,slanterns/server,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi |
6380b46ab02851ab8ab0071695f395fc20246f4c | apps/libs/gpio.h | apps/libs/gpio.h | #ifndef _GPIO_H
#define _GPIO_H
#include <unistd.h>
#include "tock.h"
#define GPIO_DRIVER_NUM 1
#ifdef __cplusplus
extern "C" {
#endif
// GPIO pin enum is defined externally in platform headers
enum GPIO_Pin_enum;
typedef enum GPIO_Pin_enum GPIO_Pin_t;
typedef enum {
PullUp=0,
PullDown,
PullNone,
} GPIO_InputMode_t;
typedef enum {
Change=0,
RisingEdge,
FallingEdge,
} GPIO_InterruptMode_t;
int gpio_enable_output(GPIO_Pin_t pin);
int gpio_set(GPIO_Pin_t pin);
int gpio_clear(GPIO_Pin_t pin);
int gpio_toggle(GPIO_Pin_t pin);
int gpio_enable_input(GPIO_Pin_t pin, GPIO_InputMode_t pin_config);
int gpio_read(GPIO_Pin_t pin);
int gpio_enable_interrupt(GPIO_Pin_t pin, GPIO_InputMode_t pin_config,
GPIO_InterruptMode_t irq_config);
int gpio_disable_interrupt(GPIO_Pin_t pin);
int gpio_disable(GPIO_Pin_t pin);
int gpio_interrupt_callback(subscribe_cb callback, void* callback_args);
#ifdef __cplusplus
}
#endif
#endif // _GPIO_H
| #ifndef _GPIO_H
#define _GPIO_H
#include <unistd.h>
#include "tock.h"
#include "firestorm.h"
#define GPIO_DRIVER_NUM 1
#ifdef __cplusplus
extern "C" {
#endif
// GPIO pin enum is defined externally in platform headers
enum GPIO_Pin_enum;
typedef enum GPIO_Pin_enum GPIO_Pin_t;
typedef enum {
PullUp=0,
PullDown,
PullNone,
} GPIO_InputMode_t;
typedef enum {
Change=0,
RisingEdge,
FallingEdge,
} GPIO_InterruptMode_t;
int gpio_enable_output(GPIO_Pin_t pin);
int gpio_set(GPIO_Pin_t pin);
int gpio_clear(GPIO_Pin_t pin);
int gpio_toggle(GPIO_Pin_t pin);
int gpio_enable_input(GPIO_Pin_t pin, GPIO_InputMode_t pin_config);
int gpio_read(GPIO_Pin_t pin);
int gpio_enable_interrupt(GPIO_Pin_t pin, GPIO_InputMode_t pin_config,
GPIO_InterruptMode_t irq_config);
int gpio_disable_interrupt(GPIO_Pin_t pin);
int gpio_disable(GPIO_Pin_t pin);
int gpio_interrupt_callback(subscribe_cb callback, void* callback_args);
#ifdef __cplusplus
}
#endif
#endif // _GPIO_H
| Make GPIO_Pin_t type work by including firestorm.h | Make GPIO_Pin_t type work by including firestorm.h
This isn't good long-term. The gpio driver should not have to depend on
a specific platform
| C | apache-2.0 | google/tock-on-titan,google/tock-on-titan,google/tock-on-titan |
4feae9f90bc7a483c54103d5bfdc9b1c231624ca | tests/regression/01-cpa/35-intervals.c | tests/regression/01-cpa/35-intervals.c | // PARAM: --enable ana.int.interval --disable ana.int.def_exc --disable ana.int.enums
void main(){
int n = 7;
for (; n; n--) {
assert(n==1); // UNKNOWN!
}
int i;
if(i-1){
assert(i==2); // UNKNOWN
}
return;
}
| // PARAM: --enable ana.int.interval --disable ana.int.def_exc --disable ana.int.enums
void main(){
int n = 7;
for (; n; n--) {
assert(n==1); // UNKNOWN!
}
int i;
if(i-1){
assert(i==2); // UNKNOWN!
}
return;
}
| Fix tests 01/35: Any int != 0 evaluates to true | Fix tests 01/35: Any int != 0 evaluates to true
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
ff0d759f679a11449e449bbc5b098b8d2ccda8db | simreverse.c | simreverse.c | #include "config.h"
#ifdef HAVE_LIBSSL
#include <openssl/ssl.h>
#include <openssl/rand.h>
#include <openssl/err.h>
#endif /* HAVE_LIBSSL */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <dirent.h>
#include <netdb.h>
#include <unistd.h>
#include <syslog.h>
#include <sysexits.h>
#include <utime.h>
#include <snet.h>
#include "denser.h"
#include "envelope.h"
#include "mx.h"
#include "ll.h"
#include "simta.h"
int
main( int argc, char *argv[])
{
extern int optind;
extern char *optarg;
struct in_addr addr;
if ( argc < 1 ) {
fprintf( stderr, "Usage: %s address\n", argv[ 0 ]);
exit( EX_USAGE );
}
if ( inet_pton( AF_INET, argv[ 1 ], &addr ) <= 0 ) {
perror( "inet_pton" );
exit( 1 );
}
switch ( check_reverse( argv[ 1 ], &addr )) {
case 0:
printf( "valid reverse\n" );
exit( 0 );
case 1:
printf( "invalid reverse\n" );
exit( 1 );
default:
fprintf( stderr, "check_reverse failed\n" );
exit( 1 );
}
}
| Check the reverse of an IP | Check the reverse of an IP
| C | mit | simta/simta,simta/simta,simta/simta |
|
39a74c1552c74910eaac60ed8574ef34e5e5ad5c | src/c/main.c | src/c/main.c | /*
* Copyright (c) 2016 Jan Hoffmann
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "windows/main_window.h"
#include <pebble.h>
static void init(void) {
main_window_push();
}
static void deinit(void) {
}
int main(void) {
init();
app_event_loop();
deinit();
}
| /*
* Copyright (c) 2016 Jan Hoffmann
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "lib/data.h"
#include "windows/main_window.h"
#include <pebble.h>
static void init(void) {
if (data_init_receiver()) {
main_window_push();
}
}
# ifndef PBL_PLATFORM_APLITE
static void app_glance_reload_callback(AppGlanceReloadSession *session, size_t limit, void *context) {
size_t count = data_get_fast_seller_count();
if (limit < count) {
count = limit;
}
AppGlanceSlice slice = (AppGlanceSlice) {};
slice.layout.icon = APP_GLANCE_SLICE_DEFAULT_ICON;
data_fast_seller *fast_seller;
for (unsigned int i = 0; i < count; i++) {
fast_seller = data_get_fast_seller(i);
slice.layout.subtitle_template_string = fast_seller->title;
slice.expiration_time = fast_seller->date;
AppGlanceResult result = app_glance_add_slice(session, slice);
if (result != APP_GLANCE_RESULT_SUCCESS) {
APP_LOG(APP_LOG_LEVEL_ERROR, "Failed to add app glance slice: %d", result);
}
}
data_deinit();
}
#endif
static void deinit(void) {
# ifndef PBL_PLATFORM_APLITE
if (data_get_fast_seller_count() > 0) {
app_glance_reload(app_glance_reload_callback, NULL);
} else {
data_deinit();
}
# else
data_deinit();
# endif
}
int main(void) {
init();
app_event_loop();
deinit();
}
| Set fast sellers as app glance on supported watches | Set fast sellers as app glance on supported watches
| C | mpl-2.0 | janh/mensa-stuttgart,janh/mensa-stuttgart,janh/mensa-stuttgart,janh/mensa-stuttgart |
14cf94eed81468759bb7b2ab084837f656059407 | stdafx.h | stdafx.h | // precompiled header
/*
*
* Author: septimomend (Ivan Chapkailo)
*
* 27.06.2017
*
*/
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <termios.h>
#include <time.h>
#include <unistd.h>
| // precompiled header
/*
*
* Author: septimomend (Ivan Chapkailo)
*
* 27.06.2017
*
*/
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <iostream>
#include <stdarg.h>
#include <cstdlib>
#include <string>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <termios.h>
#include <ctime>
#include <unistd.h>
// defines
#define SEPT_CPP_EDITOR_VERSION "0.0.1"
#define SEPT_TAB_STOP 8
#define SEPT_QUIT_TIMES 2 // click times for exit
#define CTRL_KEY(k) ((k) & 0x1f)
enum keys
{
BACKSPACE = 127,
ARROW_LEFT = 1000,
ARROW_RIGHT,
ARROW_UP,
ARROW_DOWN,
DELETE_KEY,
HOME_KEY,
END_KEY,
PAGE_UP,
PAGE_DOWN
};
enum colorful
{
HL_NORMAL = 0,
HL_COMMENT,
HL_MLCOMMENT,
HL_KEYWORD1,
HL_KEYWORD2,
HL_STRING,
HL_NUMBER,
HL_MATCH
};
| Update precompiled header -- added defines | Update precompiled header -- added defines
| C | mit | septimomend/UNIX-C-Text-Editor,septimomend/UNIX-C-Text-Editor |
7bfdc0e00b77c05fe0de79da3eaa6b0009418926 | PWG3/PWG3baseLinkDef.h | PWG3/PWG3baseLinkDef.h | #ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class AliQuarkoniaAcceptance+;
#pragma link C++ class AliQuarkoniaEfficiency+;
#pragma link C++ class AliD0toKpi+;
#pragma link C++ class AliD0toKpiAnalysis+;
#pragma link C++ class AliBtoJPSItoEle+;
#pragma link C++ class AliBtoJPSItoEleAnalysis+;
#pragma link C++ class AliAODRecoDecayHF+;
#pragma link C++ class AliAODRecoDecayHF2Prong+;
#pragma link C++ class AliAODRecoDecayHF3Prong+;
#pragma link C++ class AliAODRecoDecayHF4Prong+;
#pragma link C++ class AliAnalysisVertexingHF+;
#pragma link C++ class AliAnalysisTaskVertexingHF+;
#pragma link C++ class AliAODDimuon+;
#pragma link C++ class AliAODEventInfo+;
#pragma link C++ class AliAnalysisTaskMuonAODfromGeneral+;
#pragma link C++ class AliAnalysisTaskSingleMu+;
#endif
| #ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class AliQuarkoniaAcceptance+;
#pragma link C++ class AliQuarkoniaEfficiency+;
#pragma link C++ class AliAODRecoDecayHF+;
#pragma link C++ class AliAODRecoDecayHF2Prong+;
#pragma link C++ class AliAODRecoDecayHF3Prong+;
#pragma link C++ class AliAODRecoDecayHF4Prong+;
#pragma link C++ class AliAnalysisVertexingHF+;
#pragma link C++ class AliAnalysisTaskVertexingHF+;
#pragma link C++ class AliAODDimuon+;
#pragma link C++ class AliAODEventInfo+;
#pragma link C++ class AliAnalysisTaskMuonAODfromGeneral+;
#pragma link C++ class AliAnalysisTaskSingleMu+;
#endif
| Move AliD0toKpi* and AliBtoJPSI* from libPWG3base to libPWG3 (Andrea) | Move AliD0toKpi* and AliBtoJPSI* from libPWG3base to libPWG3 (Andrea)
| C | bsd-3-clause | mkrzewic/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,alisw/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,miranov25/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,miranov25/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,miranov25/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,shahor02/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,alisw/AliRoot,alisw/AliRoot,shahor02/AliRoot,miranov25/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,alisw/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot |
66122432b36ed35ec40499d2d93fc51fa02c20e0 | STRUCT/STRUCTLinkDef.h | STRUCT/STRUCTLinkDef.h | #ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class AliBODY;
#pragma link C++ class AliMAG;
#pragma link C++ class AliABSO;
#pragma link C++ class AliDIPO;
#pragma link C++ class AliDIPOv1;
#pragma link C++ class AliDIPOv2;
#pragma link C++ class AliFRAME;
#pragma link C++ class AliFRAMEv0;
#pragma link C++ class AliFRAMEv1;
#pragma link C++ class AliHALL;
#pragma link C++ class AliPIPE;
#pragma link C++ class AliPIPEv0;
#pragma link C++ class AliPIPEv1;
#pragma link C++ class AliPIPEv3;
#pragma link C++ class AliSHIL;
#endif
| #ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class AliBODY;
#pragma link C++ class AliMAG;
#pragma link C++ class AliABSO;
#pragma link C++ class AliABSOv0;
#pragma link C++ class AliDIPO;
#pragma link C++ class AliDIPOv1;
#pragma link C++ class AliDIPOv2;
#pragma link C++ class AliFRAME;
#pragma link C++ class AliFRAMEv0;
#pragma link C++ class AliFRAMEv1;
#pragma link C++ class AliHALL;
#pragma link C++ class AliPIPE;
#pragma link C++ class AliPIPEv0;
#pragma link C++ class AliPIPEv1;
#pragma link C++ class AliPIPEv3;
#pragma link C++ class AliSHIL;
#pragma link C++ class AliSHILv0;
#endif
| Add new classes to LinkDef | Add new classes to LinkDef
| C | bsd-3-clause | coppedis/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,alisw/AliRoot,miranov25/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,shahor02/AliRoot,coppedis/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,coppedis/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot |
12cb09e6b5ee19bb3584ae09341de0b18c17cca6 | src/rh_tcp.c | src/rh_tcp.c | /*
* This file is part of the KNOT Project
*
* Copyright (c) 2015, CESAR. 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 the CESAR 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 CESAR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <errno.h>
#include <stdio.h>
#include "node.h"
static int tcp_probe(void)
{
return -ENOSYS;
}
static void tcp_remove(void)
{
}
static int tcp_listen(void)
{
return -ENOSYS;
}
static int tcp_accept(int srv_sockfd)
{
return -ENOSYS;
}
static ssize_t tcp_recv(int sockfd, void *buffer, size_t len)
{
return -ENOSYS;
}
static ssize_t tcp_send(int sockfd, const void *buffer, size_t len)
{
return -ENOSYS;
}
static struct node_ops tcp_ops = {
.name = "Radio Head: TCP",
.probe = tcp_probe,
.remove = tcp_remove,
.listen = tcp_listen,
.accept = tcp_accept,
.recv = tcp_recv,
.send = tcp_send
};
/*
* The following functions MAY be implemented as plugins
* initialization functions, avoiding function calls such
* as manager@manager_start()->node@node_init()->
* manager@node_ops_register()->node@node_probe()
*/
int node_init(void)
{
return node_ops_register(&tcp_ops);
}
void node_exit(void)
{
}
| Add RadioHead TCP node 'driver' skeleton | gw: Add RadioHead TCP node 'driver' skeleton
This patch adds an abstraction for RadioHead TCP driver, allowing
development on Linux using TCP sockets instead of 'real' radios.
| C | lgpl-2.1 | CESARBR/knot-service-source,CESARBR/knot-service-source,CESARBR/knot-service-source,CESARBR/knot-service-source,CESARBR/knot-service-source |
|
0e226182048ab803e2b3c2dafb2cb08bddb1df7e | libgpmat/src/gp-remote.h | libgpmat/src/gp-remote.h | /* Remote access
-- Copyright (C) 2011, 2012, 2013 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- 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 _GP_REMOTE_H
#define _GP_REMOTE_H
struct gp_server;
typedef int (* gp_remote_send_t) (struct gp_server *, const void *, size_t);
typedef int (* gp_remote_sync_t) (struct gp_server *);
typedef void (* gp_remote_close_t) (struct gp_server *);
struct gp_server
{
gp_remote_send_t to_send;
gp_remote_sync_t to_synchronize;
gp_remote_close_t to_close;
};
extern void gp_remote_send (const void *addr, size_t len);
extern void gp_remote_sync (void);
extern void gp_remote_close (void);
extern int gp_remote_initialize (void);
#endif
| Remove access to mat server | Remove access to mat server
| C | apache-2.0 | stcarrez/mat,stcarrez/mat,stcarrez/mat |
|
86ee240a4a6a958b4728b3613ce05edd884caf45 | sway/commands/floating_modifier.c | sway/commands/floating_modifier.c | #include "strings.h"
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/input/keyboard.h"
struct cmd_results *cmd_floating_modifier(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "floating_modifier", EXPECTED_AT_LEAST, 1))) {
return error;
}
uint32_t mod = get_modifier_mask_by_name(argv[0]);
if (!mod) {
return cmd_results_new(CMD_INVALID, "Invalid modifier");
}
if (argc == 1 || strcasecmp(argv[1], "normal") == 0) {
config->floating_mod_inverse = false;
} else if (strcasecmp(argv[1], "inverse") == 0) {
config->floating_mod_inverse = true;
} else {
return cmd_results_new(CMD_INVALID,
"Usage: floating_modifier <mod> [inverse|normal]");
}
config->floating_mod = mod;
return cmd_results_new(CMD_SUCCESS, NULL);
}
| #include "strings.h"
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/input/keyboard.h"
struct cmd_results *cmd_floating_modifier(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "floating_modifier", EXPECTED_AT_LEAST, 1))) {
return error;
}
if (strcasecmp(argv[0], "none") == 0) {
config->floating_mod = 0;
return cmd_results_new(CMD_SUCCESS, NULL);
}
uint32_t mod = get_modifier_mask_by_name(argv[0]);
if (!mod) {
return cmd_results_new(CMD_INVALID, "Invalid modifier");
}
if (argc == 1 || strcasecmp(argv[1], "normal") == 0) {
config->floating_mod_inverse = false;
} else if (strcasecmp(argv[1], "inverse") == 0) {
config->floating_mod_inverse = true;
} else {
return cmd_results_new(CMD_INVALID,
"Usage: floating_modifier <mod> [inverse|normal]");
}
config->floating_mod = mod;
return cmd_results_new(CMD_SUCCESS, NULL);
}
| Add ability to remove the floating modifier | Add ability to remove the floating modifier
| C | mit | ascent12/sway,1ace/sway,1ace/sway,SirCmpwn/sway,1ace/sway,ascent12/sway,ascent12/sway |
2b33ac168c6e252e441f9b0a547d2bf18c153984 | Squirrel/SQRLInstaller+Private.h | Squirrel/SQRLInstaller+Private.h | //
// SQRLInstaller+Private.h
// Squirrel
//
// Created by Justin Spahr-Summers on 2013-11-19.
// Copyright (c) 2013 GitHub. All rights reserved.
//
#import "SQRLInstaller.h"
// A preferences key for the URL where the target bundle has been moved before
// installation.
//
// This is stored in preferences, rather than `SQRLShipItState`, to prevent an
// attacker from rewriting the URL during the installation process.
//
// Note that this key must remain backwards compatible, so ShipIt doesn't fail
// confusingly on a newer version.
extern NSString * const SQRLInstallerOwnedTargetBundleURLKey;
// A preferences key for the URL where the update bundle has been moved before
// installation.
//
// This is stored in preferences, rather than `SQRLShipItState`, to prevent an
// attacker from rewriting the URL during the installation process.
//
// Note that this key must remain backwards compatible, so ShipIt doesn't fail
// confusingly on a newer version.
extern NSString * const SQRLInstallerOwnedUpdateBundleURLKey;
// A preferences key for the code signature that the update _and_ target bundles
// must match in order to be valid.
//
// This is stored in preferences, rather than `SQRLShipItState`, to prevent an
// attacker from spoofing the validity requirements.
//
// Note that this key must remain backwards compatible, so ShipIt doesn't fail
// confusingly on a newer version.
extern NSString * const SQRLInstallerCodeSignatureKey;
| //
// SQRLInstaller+Private.h
// Squirrel
//
// Created by Justin Spahr-Summers on 2013-11-19.
// Copyright (c) 2013 GitHub. All rights reserved.
//
#import "SQRLInstaller.h"
// A preferences key for the URL where the target bundle has been moved before
// installation.
//
// This is stored in preferences to prevent an attacker from rewriting the URL
// during the installation process.
//
// Note that this key must remain backwards compatible, so ShipIt doesn't fail
// confusingly on a newer version.
extern NSString * const SQRLInstallerOwnedTargetBundleURLKey;
// A preferences key for the URL where the update bundle has been moved before
// installation.
//
// This is stored in preferences to prevent an attacker from rewriting the URL
// during the installation process.
//
// Note that this key must remain backwards compatible, so ShipIt doesn't fail
// confusingly on a newer version.
extern NSString * const SQRLInstallerOwnedUpdateBundleURLKey;
// A preferences key for the code signature that the update _and_ target bundles
// must match in order to be valid.
//
// This is stored in preferences to prevent an attacker from spoofing the
// validity requirements.
//
// Note that this key must remain backwards compatible, so ShipIt doesn't fail
// confusingly on a newer version.
extern NSString * const SQRLInstallerCodeSignatureKey;
| Update docs to reflect that the root prefs aren’t opposed to shipit state | Update docs to reflect that the root prefs aren’t opposed to shipit state
ShipIt state is now in the prefs too.
| C | mit | EdZava/Squirrel.Mac,EdZava/Squirrel.Mac,Squirrel/Squirrel.Mac,emiscience/Squirrel.Mac,EdZava/Squirrel.Mac,Squirrel/Squirrel.Mac,emiscience/Squirrel.Mac,emiscience/Squirrel.Mac,Squirrel/Squirrel.Mac |
c8bb5693469744e0deeb03a552f190faa2146764 | tests/integrationtests/fibonacci.c | tests/integrationtests/fibonacci.c | #include <stdio.h>
void print_fib(int n)
{
int a = 0;
int b = 1;
while (a < n)
{
printf("%d ", a);
int old_a = a;
a = b;
b = old_a + b;
}
}
int main()
{
print_fib(500);
printf("\n");
return 0;
}
| #include <stdio.h>
void print_fib(int n)
{
int a = 0;
int b = 1;
while (a < n)
{
int old_a = a;
printf("%d ", a);
a = b;
b = old_a + b;
}
}
int main()
{
print_fib(500);
printf("\n");
return 0;
}
| Fix variable declaration non-conformant to C89 | Fix variable declaration non-conformant to C89
Declaring variables on C89 need to be done at the beginning of the
function scope. The old code failed on VS2010. | C | bsd-3-clause | webmaster128/clcache,webmaster128/clcache,webmaster128/clcache |
0c159e49926e7c86b29cf7d17769a653da862254 | source/tid/enums.h | source/tid/enums.h | #pragma once
#include <string_view>
namespace tid {
enum level : int {
parent = -1,
normal = 0,
detail = 1,
pedant = 2,
};
constexpr std::string_view level2sv(level l) noexcept {
switch(l) {
case normal: return "normal";
case detail: return "detail";
case pedant: return "pedant";
case parent: return "parent";
default: return "unknown";
}
}
}
template<typename T>
extern constexpr std::string_view enum2sv(const T &item);
template<typename T>
extern constexpr auto sv2enum(std::string_view item);
template<>
constexpr std::string_view enum2sv(const tid::level & item) {
switch(item) {
case(tid::level::normal): return "normal";
case(tid::level::detail): return "detail";
case(tid::level::pedant): return "pedant";
case(tid::level::parent): return "parent";
default: throw std::runtime_error("Unrecognized tid::level enum");
}
}
template<>
constexpr auto sv2enum<tid::level>(std::string_view item) {
if(item == "normal") return tid::level::normal;
if(item == "detail") return tid::level::detail;
if(item == "pedant") return tid::level::pedant;
if(item == "parent") return tid::level::parent;
throw std::runtime_error("Given item is not a tid::level enum: " + std::string(item));
}
| Add support for specifying tid print level | Add support for specifying tid print level
Former-commit-id: dcbe2db0f881cae1e908cc67e3c32526477ea6a6 | C | mit | DavidAce/DMRG,DavidAce/DMRG,DavidAce/DMRG,DavidAce/DMRG |
|
fac07f049b1779162101baddf60a331df761e228 | cpp/libjoynr/include/joynr/StatusCode.h | cpp/libjoynr/include/joynr/StatusCode.h | /*
* #%L
* %%
* Copyright (C) 2011 - 2017 BMW Car IT GmbH
* %%
* 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.
* #L%
*/
#ifndef STATUSCODE_H
#define STATUSCODE_H
#include <cstdint>
#include <string>
namespace joynr
{
/**
* @brief This struct contains all the possible status codes of a Future.
*
*/
enum class StatusCodeEnum : std::uint8_t {
/**
* @brief
*/
SUCCESS = 0,
/**
* @brief
*/
IN_PROGRESS = 1,
/**
* @brief
*/
ERROR = 2,
/**
* @brief Future::waitFor() timed out.
*/
WAIT_TIMED_OUT = 3,
};
class StatusCode
{
public:
static std::string toString(StatusCodeEnum enumValue);
};
} // namespace joynr
#endif // STATUSCODE_H
| /*
* #%L
* %%
* Copyright (C) 2011 - 2017 BMW Car IT GmbH
* %%
* 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.
* #L%
*/
#ifndef STATUSCODE_H
#define STATUSCODE_H
#include <cstdint>
#include <string>
namespace joynr
{
/**
* @brief This struct contains all the possible status codes of a Future.
*
*/
enum class StatusCodeEnum : std::uint8_t {
/**
* @brief The Future was successful and onSuccess was called.
*/
SUCCESS = 0,
/**
* @brief The future is still in progress.
*/
IN_PROGRESS = 1,
/**
* @brief Either a time-out occured or onError was called.
*/
ERROR = 2,
/**
* @brief Future::waitFor() timed out.
*/
WAIT_TIMED_OUT = 3,
};
class StatusCode
{
public:
static std::string toString(StatusCodeEnum enumValue);
};
} // namespace joynr
#endif // STATUSCODE_H
| Improve documentation of Future status codes. | [C++] Improve documentation of Future status codes.
Change-Id: I979083e18ea5facec4e6f52fc2ed486b4a18d358
| C | apache-2.0 | bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr |
cd2450371d48da1c548b8894cccc0a67cd8b0e99 | asylo/test/util/test_flags.h | asylo/test/util/test_flags.h | /*
*
* Copyright 2018 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef ASYLO_TEST_UTIL_TEST_FLAGS_H_
#define ASYLO_TEST_UTIL_TEST_FLAGS_H_
#include "absl/flags/declare.h"
// Location for all temporary test files.
ABSL_DECLARE_FLAG(std::string, test_tmpdir);
#endif // ASYLO_TEST_UTIL_TEST_FLAGS_H_
| /*
*
* Copyright 2018 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef ASYLO_TEST_UTIL_TEST_FLAGS_H_
#define ASYLO_TEST_UTIL_TEST_FLAGS_H_
#include <string>
#include "absl/flags/declare.h"
// Location for all temporary test files.
ABSL_DECLARE_FLAG(std::string, test_tmpdir);
#endif // ASYLO_TEST_UTIL_TEST_FLAGS_H_
| Add missing include of string | Add missing include of string
PiperOrigin-RevId: 317401762
Change-Id: Icbc4d0e2a4e99a9e73a4d8e7ad148e34ee2e9d03
| C | apache-2.0 | google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo |
0a6986c0d9b11bf808264239a7d107fecf67dab1 | test/functionalities/signal/main.c | test/functionalities/signal/main.c | #include <sys/signal.h>
#include <stdio.h>
#include <unistd.h>
void handler_usr1 (int i)
{
puts ("got signal usr1");
}
void handler_alrm (int i)
{
puts ("got signal ALRM");
}
int main ()
{
int i = 0;
signal (SIGUSR1, handler_usr1);
signal (SIGALRM, handler_alrm);
puts ("Put breakpoint here");
while (i++ < 20)
sleep (1);
}
| #include <signal.h>
#include <stdio.h>
#include <unistd.h>
void handler_usr1 (int i)
{
puts ("got signal usr1");
}
void handler_alrm (int i)
{
puts ("got signal ALRM");
}
int main ()
{
int i = 0;
signal (SIGUSR1, handler_usr1);
signal (SIGALRM, handler_alrm);
puts ("Put breakpoint here");
while (i++ < 20)
sleep (1);
}
| Include signal.h instead of sys/signal.h in the test case. | [TestSendSignal] Include signal.h instead of sys/signal.h in the test case.
Summary:
Android API-9 does not have sys/signal.h. However, all sys/signal.h
has when present is an include of signal.h.
Test Plan: dotest.py -p TestSendSignal on linux and Android.
Reviewers: chaoren
Reviewed By: chaoren
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D9779
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@237381 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb |
2569701a2bdeee6811b90b6968192e387a10f402 | tests/regression/01-cpa/50-escaping-recursion.c | tests/regression/01-cpa/50-escaping-recursion.c | int rec(int i,int* ptr) {
int top;
int x = 17;
if(i == 0) {
rec(5,&x);
// Recursive call may have modified x
assert(x == 17); //UNKNOWN!
} else {
x = 31;
// ptr points to the outer x, it is unaffected by this assignment
// and should be 17
assert(*ptr == 31); //UNKNOWN!
if(top) {
ptr = &x;
}
// ptr may now point to both the inner and the outer x
*ptr = 12;
assert(*ptr == 12); //UNKNOWN!
assert(x == 12); //UNKNOWN!
}
return 0;
}
int main() {
int t;
rec(0,&t);
return 0;
}
| Add test case for escaping via recursion | Add test case for escaping via recursion
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
b1501a3cde99f68c9c419d9db4ad15b8fed814f3 | src/core/SkEdgeBuilder.h | src/core/SkEdgeBuilder.h | #ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
class SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEdge** edgeList() { return fList.begin(); }
private:
SkChunkAlloc fAlloc;
SkTDArray<SkEdge*> fList;
int fShiftUp;
void addLine(const SkPoint pts[]);
void addQuad(const SkPoint pts[]);
void addCubic(const SkPoint pts[]);
void addClipper(SkEdgeClipper*);
};
#endif
| #ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
struct SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEdge** edgeList() { return fList.begin(); }
private:
SkChunkAlloc fAlloc;
SkTDArray<SkEdge*> fList;
int fShiftUp;
void addLine(const SkPoint pts[]);
void addQuad(const SkPoint pts[]);
void addCubic(const SkPoint pts[]);
void addClipper(SkEdgeClipper*);
};
#endif
| Fix warning (struct forward-declared as class). | Fix warning (struct forward-declared as class).
Review URL: http://codereview.appspot.com/164061
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@451 2bbb7eff-a529-9590-31e7-b0007b416f81
| C | bsd-3-clause | shahrzadmn/skia,houst0nn/external_skia,GladeRom/android_external_skia,MIPS/external-chromium_org-third_party-skia,VRToxin-AOSP/android_external_skia,zhaochengw/platform_external_skia,ench0/external_chromium_org_third_party_skia,MyAOSP/external_chromium_org_third_party_skia,akiss77/skia,fire855/android_external_skia,Infinitive-OS/platform_external_skia,Infinitive-OS/platform_external_skia,FusionSP/android_external_skia,mmatyas/skia,pcwalton/skia,vanish87/skia,xzzz9097/android_external_skia,Pure-Aosp/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,vanish87/skia,scroggo/skia,UBERMALLOW/external_skia,TeslaOS/android_external_skia,FusionSP/external_chromium_org_third_party_skia,wildermason/external_skia,VRToxin-AOSP/android_external_skia,Android-AOSP/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,AOSPU/external_chromium_org_third_party_skia,CyanogenMod/android_external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,VRToxin-AOSP/android_external_skia,pcwalton/skia,zhaochengw/platform_external_skia,ominux/skia,MinimalOS/android_external_skia,Khaon/android_external_skia,pcwalton/skia,Purity-Lollipop/platform_external_skia,Tesla-Redux/android_external_skia,rubenvb/skia,MinimalOS-AOSP/platform_external_skia,amyvmiwei/skia,vvuk/skia,AOSPU/external_chromium_org_third_party_skia,rubenvb/skia,TeamTwisted/external_skia,shahrzadmn/skia,android-ia/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,OneRom/external_skia,fire855/android_external_skia,Euphoria-OS-Legacy/android_external_skia,wildermason/external_skia,samuelig/skia,TeamEOS/external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,samuelig/skia,geekboxzone/lollipop_external_skia,F-AOSP/platform_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,ench0/external_skia,MyAOSP/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,xin3liang/platform_external_chromium_org_third_party_skia,mozilla-b2g/external_skia,pacerom/external_skia,nvoron23/skia,NamelessRom/android_external_skia,qrealka/skia-hc,sigysmund/platform_external_skia,BrokenROM/external_skia,xzzz9097/android_external_skia,aospo/platform_external_skia,UBERMALLOW/external_skia,OptiPop/external_skia,Pure-Aosp/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,OneRom/external_skia,Plain-Andy/android_platform_external_skia,HealthyHoney/temasek_SKIA,nvoron23/skia,HealthyHoney/temasek_SKIA,akiss77/skia,fire855/android_external_skia,Infusion-OS/android_external_skia,nox/skia,FusionSP/external_chromium_org_third_party_skia,vvuk/skia,android-ia/platform_external_skia,nfxosp/platform_external_skia,sudosurootdev/external_skia,Infinitive-OS/platform_external_skia,MIPS/external-chromium_org-third_party-skia,byterom/android_external_skia,Euphoria-OS-Legacy/android_external_skia,ctiao/platform-external-skia,TeslaProject/external_skia,sombree/android_external_skia,SlimSaber/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,noselhq/skia,suyouxin/android_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,w3nd1go/android_external_skia,samuelig/skia,MinimalOS/android_external_chromium_org_third_party_skia,TeamExodus/external_skia,AOSPA-L/android_external_skia,todotodoo/skia,RadonX-ROM/external_skia,Hikari-no-Tenshi/android_external_skia,F-AOSP/platform_external_skia,pcwalton/skia,houst0nn/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,ominux/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,OptiPop/external_chromium_org_third_party_skia,suyouxin/android_external_skia,DiamondLovesYou/skia-sys,OptiPop/external_chromium_org_third_party_skia,AOSP-YU/platform_external_skia,MonkeyZZZZ/platform_external_skia,InfinitiveOS/external_skia,sombree/android_external_skia,AOSPB/external_skia,Jichao/skia,temasek/android_external_skia,google/skia,F-AOSP/platform_external_skia,SlimSaber/android_external_skia,MinimalOS/android_external_skia,aosp-mirror/platform_external_skia,TeamExodus/external_skia,MinimalOS-AOSP/platform_external_skia,TeslaOS/android_external_skia,HalCanary/skia-hc,xin3liang/platform_external_chromium_org_third_party_skia,boulzordev/android_external_skia,houst0nn/external_skia,AsteroidOS/android_external_skia,Hybrid-Rom/external_skia,TeamEOS/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,noselhq/skia,SlimSaber/android_external_skia,todotodoo/skia,Fusion-Rom/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,YUPlayGodDev/platform_external_skia,codeaurora-unoffical/platform-external-skia,VRToxin-AOSP/android_external_skia,Euphoria-OS-Legacy/android_external_skia,MinimalOS/android_external_skia,MinimalOS/android_external_skia,boulzordev/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,mydongistiny/android_external_skia,Android-AOSP/external_skia,temasek/android_external_skia,TeslaOS/android_external_skia,invisiblek/android_external_skia,TeamExodus/external_skia,sudosurootdev/external_skia,Omegaphora/external_chromium_org_third_party_skia,TeamEOS/external_skia,AOSPB/external_skia,VRToxin-AOSP/android_external_skia,GladeRom/android_external_skia,aospo/platform_external_skia,tmpvar/skia.cc,HalCanary/skia-hc,qrealka/skia-hc,TeslaOS/android_external_skia,pcwalton/skia,AOSP-YU/platform_external_skia,aosp-mirror/platform_external_skia,fire855/android_external_skia,F-AOSP/platform_external_skia,AndroidOpenDevelopment/android_external_skia,Khaon/android_external_skia,Asteroid-Project/android_external_skia,codeaurora-unoffical/platform-external-skia,OptiPop/external_skia,nox/skia,pacerom/external_skia,MinimalOS/external_chromium_org_third_party_skia,Asteroid-Project/android_external_skia,sudosurootdev/external_skia,mmatyas/skia,DesolationStaging/android_external_skia,temasek/android_external_skia,ominux/skia,MyAOSP/external_chromium_org_third_party_skia,MinimalOS/android_external_chromium_org_third_party_skia,Android-AOSP/external_skia,zhaochengw/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,TeamExodus/external_skia,F-AOSP/platform_external_skia,mydongistiny/android_external_skia,Purity-Lollipop/platform_external_skia,BrokenROM/external_skia,temasek/android_external_skia,NamelessRom/android_external_skia,noselhq/skia,byterom/android_external_skia,samuelig/skia,DARKPOP/external_chromium_org_third_party_skia,Fusion-Rom/external_chromium_org_third_party_skia,HealthyHoney/temasek_SKIA,ench0/external_chromium_org_third_party_skia,nox/skia,Fusion-Rom/android_external_skia,larsbergstrom/skia,MinimalOS/external_skia,TeamExodus/external_skia,nvoron23/skia,Tesla-Redux/android_external_skia,nox/skia,FusionSP/android_external_skia,ctiao/platform-external-skia,pacerom/external_skia,NamelessRom/android_external_skia,HalCanary/skia-hc,Pure-Aosp/android_external_skia,ominux/skia,VentureROM-L/android_external_skia,Hybrid-Rom/external_skia,noselhq/skia,ench0/external_skia,VRToxin-AOSP/android_external_skia,Fusion-Rom/android_external_skia,AOSP-YU/platform_external_skia,Igalia/skia,android-ia/platform_external_skia,AOSP-YU/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,todotodoo/skia,aosp-mirror/platform_external_skia,MinimalOS/android_external_skia,sigysmund/platform_external_skia,scroggo/skia,Tesla-Redux/android_external_skia,OptiPop/external_chromium_org_third_party_skia,AOSPU/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,todotodoo/skia,Omegaphora/external_skia,MinimalOS-AOSP/platform_external_skia,VentureROM-L/android_external_skia,boulzordev/android_external_skia,TeamTwisted/external_skia,sudosurootdev/external_skia,Jichao/skia,mmatyas/skia,MIPS/external-chromium_org-third_party-skia,VentureROM-L/android_external_skia,TeamBliss-LP/android_external_skia,invisiblek/android_external_skia,noselhq/skia,YUPlayGodDev/platform_external_skia,AOSPB/external_skia,chenlian2015/skia_from_google,shahrzadmn/skia,HalCanary/skia-hc,Infinitive-OS/platform_external_skia,aosp-mirror/platform_external_skia,Plain-Andy/android_platform_external_skia,Hikari-no-Tenshi/android_external_skia,Euphoria-OS-Legacy/android_external_skia,AndroidOpenDevelopment/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,shahrzadmn/skia,YUPlayGodDev/platform_external_skia,ominux/skia,mydongistiny/external_chromium_org_third_party_skia,Android-AOSP/external_skia,Plain-Andy/android_platform_external_skia,scroggo/skia,AOSPA-L/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,HalCanary/skia-hc,xzzz9097/android_external_skia,DesolationStaging/android_external_skia,OptiPop/external_skia,nvoron23/skia,sudosurootdev/external_skia,w3nd1go/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,Khaon/android_external_skia,chenlian2015/skia_from_google,akiss77/skia,sigysmund/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,CyanogenMod/android_external_chromium_org_third_party_skia,DiamondLovesYou/skia-sys,w3nd1go/android_external_skia,Asteroid-Project/android_external_skia,mydongistiny/android_external_skia,AndroidOpenDevelopment/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,Infusion-OS/android_external_skia,zhaochengw/platform_external_skia,MinimalOS-AOSP/platform_external_skia,MinimalOS-AOSP/platform_external_skia,Asteroid-Project/android_external_skia,AOSPB/external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,MinimalOS/external_skia,AsteroidOS/android_external_skia,InfinitiveOS/external_skia,byterom/android_external_skia,PAC-ROM/android_external_skia,codeaurora-unoffical/platform-external-skia,FusionSP/external_chromium_org_third_party_skia,AOSPA-L/android_external_skia,DesolationStaging/android_external_skia,xzzz9097/android_external_skia,Asteroid-Project/android_external_skia,TeamEOS/external_skia,SlimSaber/android_external_skia,MinimalOS/android_external_skia,TeamBliss-LP/android_external_skia,MinimalOS/external_skia,jtg-gg/skia,DiamondLovesYou/skia-sys,geekboxzone/mmallow_external_skia,Jichao/skia,Infinitive-OS/platform_external_skia,DiamondLovesYou/skia-sys,akiss77/skia,MarshedOut/android_external_skia,AOSP-YU/platform_external_skia,MonkeyZZZZ/platform_external_skia,ench0/external_skia,mmatyas/skia,w3nd1go/android_external_skia,Hybrid-Rom/external_skia,FusionSP/android_external_skia,AOSPB/external_skia,google/skia,akiss77/skia,mmatyas/skia,DARKPOP/external_chromium_org_third_party_skia,DesolationStaging/android_external_skia,Plain-Andy/android_platform_external_skia,pcwalton/skia,Pure-Aosp/android_external_skia,houst0nn/external_skia,Euphoria-OS-Legacy/android_external_skia,ench0/external_skia,RadonX-ROM/external_skia,YUPlayGodDev/platform_external_skia,MinimalOS-AOSP/platform_external_skia,android-ia/platform_external_skia,aosp-mirror/platform_external_skia,Android-AOSP/external_skia,ench0/external_skia,AOSPU/external_chromium_org_third_party_skia,scroggo/skia,amyvmiwei/skia,mozilla-b2g/external_skia,Fusion-Rom/android_external_skia,NamelessRom/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,Fusion-Rom/android_external_skia,suyouxin/android_external_skia,FusionSP/external_chromium_org_third_party_skia,TeamTwisted/external_skia,MinimalOS/external_skia,jtg-gg/skia,CyanogenMod/android_external_chromium_org_third_party_skia,xzzz9097/android_external_skia,w3nd1go/android_external_skia,tmpvar/skia.cc,YUPlayGodDev/platform_external_skia,VentureROM-L/android_external_skia,SlimSaber/android_external_skia,MarshedOut/android_external_skia,Pure-Aosp/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,BrokenROM/external_skia,vanish87/skia,MinimalOS/external_skia,zhaochengw/platform_external_skia,Plain-Andy/android_platform_external_skia,akiss77/skia,mozilla-b2g/external_skia,RadonX-ROM/external_skia,Hybrid-Rom/external_skia,YUPlayGodDev/platform_external_skia,mydongistiny/external_chromium_org_third_party_skia,TeamEOS/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,noselhq/skia,aospo/platform_external_skia,MIPS/external-chromium_org-third_party-skia,PAC-ROM/android_external_skia,DesolationStaging/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,Omegaphora/external_skia,AOSP-YU/platform_external_skia,VentureROM-L/android_external_skia,Purity-Lollipop/platform_external_skia,SlimSaber/android_external_skia,larsbergstrom/skia,GladeRom/android_external_skia,timduru/platform-external-skia,FusionSP/external_chromium_org_third_party_skia,aospo/platform_external_skia,MarshedOut/android_external_skia,samuelig/skia,ctiao/platform-external-skia,Samsung/skia,DiamondLovesYou/skia-sys,MinimalOS/external_skia,rubenvb/skia,qrealka/skia-hc,OptiPop/external_skia,AndroidOpenDevelopment/android_external_skia,Igalia/skia,amyvmiwei/skia,Fusion-Rom/external_chromium_org_third_party_skia,BrokenROM/external_skia,qrealka/skia-hc,android-ia/platform_external_chromium_org_third_party_skia,GladeRom/android_external_skia,MonkeyZZZZ/platform_external_skia,FusionSP/android_external_skia,MonkeyZZZZ/platform_external_skia,AsteroidOS/android_external_skia,OneRom/external_skia,ench0/external_chromium_org_third_party_skia,larsbergstrom/skia,codeaurora-unoffical/platform-external-skia,MarshedOut/android_external_skia,tmpvar/skia.cc,MonkeyZZZZ/platform_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,tmpvar/skia.cc,OptiPop/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,Khaon/android_external_skia,TeamExodus/external_skia,Samsung/skia,xzzz9097/android_external_skia,google/skia,spezi77/android_external_skia,amyvmiwei/skia,Tesla-Redux/android_external_skia,AOSPA-L/android_external_skia,fire855/android_external_skia,codeaurora-unoffical/platform-external-skia,VRToxin-AOSP/android_external_skia,OneRom/external_skia,google/skia,TeamTwisted/external_skia,TeamBliss-LP/android_external_skia,suyouxin/android_external_skia,HealthyHoney/temasek_SKIA,rubenvb/skia,TeslaOS/android_external_skia,timduru/platform-external-skia,temasek/android_external_skia,vanish87/skia,chenlian2015/skia_from_google,RadonX-ROM/external_skia,vvuk/skia,nfxosp/platform_external_skia,invisiblek/android_external_skia,android-ia/platform_external_skia,TeamExodus/external_skia,NamelessRom/android_external_skia,mydongistiny/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,TeamBliss-LP/android_external_skia,InfinitiveOS/external_skia,xin3liang/platform_external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,OneRom/external_skia,Euphoria-OS-Legacy/android_external_skia,InfinitiveOS/external_skia,HalCanary/skia-hc,Infusion-OS/android_external_skia,nfxosp/platform_external_skia,aosp-mirror/platform_external_skia,mozilla-b2g/external_skia,wildermason/external_skia,zhaochengw/platform_external_skia,RadonX-ROM/external_skia,AOSP-YU/platform_external_skia,google/skia,Euphoria-OS-Legacy/android_external_skia,HealthyHoney/temasek_SKIA,MonkeyZZZZ/platform_external_skia,Infusion-OS/android_external_skia,aospo/platform_external_skia,MarshedOut/android_external_skia,MinimalOS/external_skia,Jichao/skia,google/skia,byterom/android_external_skia,vanish87/skia,vvuk/skia,Igalia/skia,larsbergstrom/skia,houst0nn/external_skia,tmpvar/skia.cc,Purity-Lollipop/platform_external_skia,Omegaphora/external_chromium_org_third_party_skia,GladeRom/android_external_skia,AsteroidOS/android_external_skia,AOSPA-L/android_external_skia,pcwalton/skia,AsteroidOS/android_external_skia,nfxosp/platform_external_skia,Khaon/android_external_skia,RadonX-ROM/external_skia,AOSPB/external_skia,timduru/platform-external-skia,AOSPU/external_chromium_org_third_party_skia,scroggo/skia,ench0/external_chromium_org_third_party_skia,byterom/android_external_skia,chenlian2015/skia_from_google,Jichao/skia,larsbergstrom/skia,RadonX-ROM/external_skia,AOSPU/external_chromium_org_third_party_skia,invisiblek/android_external_skia,AOSPU/external_chromium_org_third_party_skia,timduru/platform-external-skia,FusionSP/android_external_skia,pacerom/external_skia,nvoron23/skia,AsteroidOS/android_external_skia,sigysmund/platform_external_skia,ench0/external_skia,InfinitiveOS/external_skia,w3nd1go/android_external_skia,Samsung/skia,nox/skia,w3nd1go/android_external_skia,OptiPop/external_chromium_org_third_party_skia,boulzordev/android_external_skia,temasek/android_external_skia,Samsung/skia,MinimalOS/android_external_skia,VentureROM-L/android_external_skia,chenlian2015/skia_from_google,YUPlayGodDev/platform_external_skia,TeamEOS/external_skia,geekboxzone/mmallow_external_skia,OneRom/external_skia,vanish87/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Plain-Andy/android_platform_external_skia,Igalia/skia,Tesla-Redux/android_external_skia,geekboxzone/mmallow_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,mmatyas/skia,TeslaOS/android_external_skia,BrokenROM/external_skia,rubenvb/skia,MinimalOS/external_chromium_org_third_party_skia,invisiblek/android_external_skia,qrealka/skia-hc,RadonX-ROM/external_skia,ctiao/platform-external-skia,TeslaProject/external_skia,akiss77/skia,Omegaphora/external_skia,ench0/external_chromium_org_third_party_skia,codeaurora-unoffical/platform-external-skia,mmatyas/skia,sombree/android_external_skia,DesolationStaging/android_external_skia,Hybrid-Rom/external_skia,DARKPOP/external_chromium_org_third_party_skia,qrealka/skia-hc,F-AOSP/platform_external_skia,OptiPop/external_skia,byterom/android_external_skia,shahrzadmn/skia,Hikari-no-Tenshi/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,TeamEOS/external_chromium_org_third_party_skia,Pure-Aosp/android_external_skia,timduru/platform-external-skia,Fusion-Rom/android_external_skia,ench0/external_chromium_org_third_party_skia,nox/skia,UBERMALLOW/external_skia,sombree/android_external_skia,Android-AOSP/external_skia,aospo/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,TeamEOS/external_skia,geekboxzone/lollipop_external_skia,vvuk/skia,TeamBliss-LP/android_external_skia,MonkeyZZZZ/platform_external_skia,geekboxzone/lollipop_external_skia,sigysmund/platform_external_skia,AOSPA-L/android_external_skia,mozilla-b2g/external_skia,PAC-ROM/android_external_skia,temasek/android_external_skia,TeslaOS/android_external_skia,aosp-mirror/platform_external_skia,Tesla-Redux/android_external_skia,sigysmund/platform_external_skia,jtg-gg/skia,NamelessRom/android_external_skia,Hikari-no-Tenshi/android_external_skia,Khaon/android_external_skia,larsbergstrom/skia,byterom/android_external_skia,FusionSP/external_chromium_org_third_party_skia,Fusion-Rom/android_external_skia,Asteroid-Project/android_external_skia,wildermason/external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Igalia/skia,geekboxzone/lollipop_external_skia,amyvmiwei/skia,mydongistiny/android_external_skia,shahrzadmn/skia,OptiPop/external_skia,OneRom/external_skia,Asteroid-Project/android_external_skia,PAC-ROM/android_external_skia,AndroidOpenDevelopment/android_external_skia,VentureROM-L/android_external_skia,wildermason/external_skia,vanish87/skia,Pure-Aosp/android_external_skia,nfxosp/platform_external_skia,akiss77/skia,MarshedOut/android_external_skia,MinimalOS/android_external_skia,Asteroid-Project/android_external_skia,pcwalton/skia,nvoron23/skia,noselhq/skia,Infinitive-OS/platform_external_skia,geekboxzone/mmallow_external_skia,MIPS/external-chromium_org-third_party-skia,timduru/platform-external-skia,Tesla-Redux/android_external_skia,TeslaProject/external_skia,nfxosp/platform_external_skia,Plain-Andy/android_platform_external_skia,boulzordev/android_external_skia,todotodoo/skia,codeaurora-unoffical/platform-external-skia,android-ia/platform_external_skia,HealthyHoney/temasek_SKIA,TeamEOS/external_skia,timduru/platform-external-skia,nfxosp/platform_external_skia,chenlian2015/skia_from_google,MinimalOS/external_chromium_org_third_party_skia,Jichao/skia,MinimalOS/external_chromium_org_third_party_skia,ctiao/platform-external-skia,Omegaphora/external_skia,suyouxin/android_external_skia,TeslaProject/external_skia,geekboxzone/lollipop_external_skia,MinimalOS-AOSP/platform_external_skia,TeamBliss-LP/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,spezi77/android_external_skia,nox/skia,samuelig/skia,mydongistiny/android_external_skia,w3nd1go/android_external_skia,mozilla-b2g/external_skia,suyouxin/android_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,NamelessRom/android_external_skia,pacerom/external_skia,UBERMALLOW/external_skia,android-ia/platform_external_skia,xzzz9097/android_external_skia,qrealka/skia-hc,ench0/external_skia,android-ia/platform_external_chromium_org_third_party_skia,nfxosp/platform_external_skia,rubenvb/skia,google/skia,amyvmiwei/skia,AOSPA-L/android_external_skia,sudosurootdev/external_skia,Omegaphora/external_chromium_org_third_party_skia,Purity-Lollipop/platform_external_skia,nox/skia,Infusion-OS/android_external_skia,mozilla-b2g/external_skia,YUPlayGodDev/platform_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,jtg-gg/skia,Infusion-OS/android_external_skia,spezi77/android_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,GladeRom/android_external_skia,suyouxin/android_external_skia,Omegaphora/external_skia,HalCanary/skia-hc,geekboxzone/lollipop_external_skia,vvuk/skia,Jichao/skia,wildermason/external_skia,AndroidOpenDevelopment/android_external_skia,Hikari-no-Tenshi/android_external_skia,Purity-Lollipop/platform_external_skia,tmpvar/skia.cc,MarshedOut/android_external_skia,houst0nn/external_skia,nvoron23/skia,spezi77/android_external_skia,shahrzadmn/skia,jtg-gg/skia,mydongistiny/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,ctiao/platform-external-skia,OneRom/external_skia,sigysmund/platform_external_skia,AOSP-YU/platform_external_skia,UBERMALLOW/external_skia,Khaon/android_external_skia,zhaochengw/platform_external_skia,aospo/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,android-ia/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,invisiblek/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,sombree/android_external_skia,DiamondLovesYou/skia-sys,mmatyas/skia,Igalia/skia,GladeRom/android_external_skia,jtg-gg/skia,rubenvb/skia,MinimalOS/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,vvuk/skia,todotodoo/skia,amyvmiwei/skia,CyanogenMod/android_external_chromium_org_third_party_skia,google/skia,geekboxzone/mmallow_external_skia,tmpvar/skia.cc,OptiPop/external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,MinimalOS/external_skia,UBERMALLOW/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,TeamTwisted/external_skia,Infusion-OS/android_external_skia,nfxosp/platform_external_skia,xzzz9097/android_external_skia,SlimSaber/android_external_skia,MonkeyZZZZ/platform_external_skia,DARKPOP/external_chromium_org_third_party_skia,chenlian2015/skia_from_google,samuelig/skia,spezi77/android_external_skia,Samsung/skia,larsbergstrom/skia,Purity-Lollipop/platform_external_skia,TeamEOS/external_skia,vanish87/skia,boulzordev/android_external_skia,geekboxzone/mmallow_external_skia,ominux/skia,TeslaProject/external_skia,HalCanary/skia-hc,geekboxzone/mmallow_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Android-AOSP/external_skia,pcwalton/skia,Samsung/skia,vanish87/skia,android-ia/platform_external_chromium_org_third_party_skia,GladeRom/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,InfinitiveOS/external_skia,qrealka/skia-hc,pacerom/external_skia,rubenvb/skia,google/skia,invisiblek/android_external_skia,Jichao/skia,byterom/android_external_skia,AOSPB/external_skia,UBERMALLOW/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,larsbergstrom/skia,mydongistiny/android_external_skia,Hybrid-Rom/external_skia,AsteroidOS/android_external_skia,MarshedOut/android_external_skia,nvoron23/skia,geekboxzone/mmallow_external_skia,scroggo/skia,boulzordev/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,DesolationStaging/android_external_skia,aosp-mirror/platform_external_skia,Tesla-Redux/android_external_skia,Infusion-OS/android_external_skia,FusionSP/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,InfinitiveOS/external_skia,TeamEOS/external_skia,ench0/external_skia,mydongistiny/external_chromium_org_third_party_skia,fire855/android_external_skia,ench0/external_chromium_org_third_party_skia,nvoron23/skia,mmatyas/skia,Infinitive-OS/platform_external_skia,Pure-Aosp/android_external_skia,YUPlayGodDev/platform_external_skia,VentureROM-L/android_external_skia,TeamExodus/external_skia,fire855/android_external_skia,DesolationStaging/android_external_skia,vvuk/skia,Purity-Lollipop/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Khaon/android_external_skia,mydongistiny/android_external_skia,sombree/android_external_skia,larsbergstrom/skia,AndroidOpenDevelopment/android_external_skia,wildermason/external_skia,todotodoo/skia,TeamTwisted/external_skia,boulzordev/android_external_skia,ctiao/platform-external-skia,MinimalOS-AOSP/platform_external_skia,PAC-ROM/android_external_skia,aosp-mirror/platform_external_skia,tmpvar/skia.cc,sudosurootdev/external_skia,DiamondLovesYou/skia-sys,HealthyHoney/temasek_SKIA,scroggo/skia,Omegaphora/external_skia,SlimSaber/android_external_skia,rubenvb/skia,F-AOSP/platform_external_skia,AsteroidOS/android_external_skia,AOSP-YU/platform_external_skia,sudosurootdev/external_skia,pacerom/external_skia,HealthyHoney/temasek_SKIA,codeaurora-unoffical/platform-external-skia,noselhq/skia,sigysmund/platform_external_skia,vvuk/skia,Hikari-no-Tenshi/android_external_skia,AOSPB/external_skia,w3nd1go/android_external_skia,geekboxzone/lollipop_external_skia,AOSPA-L/android_external_skia,todotodoo/skia,Omegaphora/external_chromium_org_third_party_skia,invisiblek/android_external_skia,F-AOSP/platform_external_skia,TeamTwisted/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,geekboxzone/mmallow_external_skia,OptiPop/external_skia,Jichao/skia,MinimalOS-AOSP/platform_external_skia,amyvmiwei/skia,Omegaphora/external_skia,TeamBliss-LP/android_external_skia,ench0/external_chromium_org_third_party_skia,samuelig/skia,TeslaProject/external_skia,shahrzadmn/skia,TeslaOS/android_external_skia,Samsung/skia,FusionSP/android_external_skia,wildermason/external_skia,zhaochengw/platform_external_skia,Samsung/skia,aospo/platform_external_skia,shahrzadmn/skia,UBERMALLOW/external_skia,google/skia,fire855/android_external_skia,VRToxin-AOSP/android_external_skia,HalCanary/skia-hc,sombree/android_external_skia,TeamTwisted/external_skia,DARKPOP/external_chromium_org_third_party_skia,nox/skia,OneRom/external_skia,UBERMALLOW/external_skia,OptiPop/external_skia,PAC-ROM/android_external_skia,boulzordev/android_external_skia,mozilla-b2g/external_skia,TeamExodus/external_skia,Euphoria-OS-Legacy/android_external_skia,ominux/skia,houst0nn/external_skia,akiss77/skia,temasek/android_external_skia,BrokenROM/external_skia,noselhq/skia,MinimalOS/android_external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,HalCanary/skia-hc,BrokenROM/external_skia,tmpvar/skia.cc,ominux/skia,jtg-gg/skia,MyAOSP/external_chromium_org_third_party_skia,Igalia/skia,MarshedOut/android_external_skia,Infinitive-OS/platform_external_skia,geekboxzone/lollipop_external_skia,AOSPB/external_skia,Omegaphora/external_skia,NamelessRom/android_external_skia,InfinitiveOS/external_skia,scroggo/skia,spezi77/android_external_skia,TeslaProject/external_skia,TeamTwisted/external_skia,BrokenROM/external_skia,sombree/android_external_skia,ominux/skia,TeslaProject/external_skia,todotodoo/skia,Fusion-Rom/android_external_skia,Igalia/skia |
6a436d0cc010b4e281d3fb5c0adcffca6175f536 | cc1/tests/test042.c | cc1/tests/test042.c | /*
name: TEST042
description: Test for bug parsing ternary operators
output:
test042.c:19: error: bad type convertion requested
F1 I
G2 F1 main
{
\
F3 0
X4 F3 f
*/
int
main(void)
{
void f(void);
return (int) f();
}
| Add test for casting from void | Add test for casting from void
This cast is not allowed, because there is no value
to cast.
| C | isc | k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/kcc |
|
2c063183a172e9f42e174b2741d532b240effd46 | core/meta/inc/TEnumConstant.h | core/meta/inc/TEnumConstant.h | // @(#)root/meta:$Id$
// Author: Bianca-Cristina Cristescu 09/07/13
/*************************************************************************
* Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TEnumConstant
#define ROOT_TEnumConstant
//////////////////////////////////////////////////////////////////////////
// //
// TEnumConstant //
// //
// TEnumConstant class defines a constant in the TEnum type. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGlobal
#include "TGlobal.h"
#endif
class TEnum;
class TEnumConstant : public TGlobal {
private:
const TEnum *fEnum; //the enum type
Long64_t fValue; //the value for the constant
public:
TEnumConstant(): fEnum(0), fValue(-1) {}
TEnumConstant(DataMemberInfo_t *info, const char* name, Long64_t value, TEnum* type);
virtual ~TEnumConstant();
virtual void *GetAddress() const { return (void*)fValue; }
Long64_t GetValue() const { return fValue; }
const TEnum *GetType() const { return fEnum; }
ClassDef(TEnumConstant,2) //Enum type constant
};
#endif
| // @(#)root/meta:$Id$
// Author: Bianca-Cristina Cristescu 09/07/13
/*************************************************************************
* Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TEnumConstant
#define ROOT_TEnumConstant
//////////////////////////////////////////////////////////////////////////
// //
// TEnumConstant //
// //
// TEnumConstant class defines a constant in the TEnum type. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGlobal
#include "TGlobal.h"
#endif
class TEnum;
class TEnumConstant : public TGlobal {
private:
const TEnum *fEnum; //the enum type
Long64_t fValue; //the value for the constant
public:
TEnumConstant(): fEnum(0), fValue(-1) {}
TEnumConstant(DataMemberInfo_t *info, const char* name, Long64_t value, TEnum* type);
virtual ~TEnumConstant();
virtual void *GetAddress() const { return (void*) &fValue; }
Long64_t GetValue() const { return fValue; }
const TEnum *GetType() const { return fEnum; }
ClassDef(TEnumConstant,2) //Enum type constant
};
#endif
| Implement a GetAddress method that returns the address of the value data member | Implement a GetAddress method that returns the address of the value data member
this is different from the one of TGlobal which implies the presence of
information in the interpreter. This is done in order to support enum constants
which are created in the ROOT typesystem starting from the information in rootpcms.
*IMPORTANT NOTE*: the type of the enum constant value is Long64_t.
| C | lgpl-2.1 | zzxuanyuan/root-compressor-dummy,bbockelm/root,evgeny-boger/root,mattkretz/root,gganis/root,veprbl/root,sirinath/root,agarciamontoro/root,beniz/root,zzxuanyuan/root-compressor-dummy,pspe/root,vukasinmilosevic/root,satyarth934/root,sbinet/cxx-root,davidlt/root,CristinaCristescu/root,bbockelm/root,vukasinmilosevic/root,lgiommi/root,dfunke/root,sbinet/cxx-root,dfunke/root,CristinaCristescu/root,vukasinmilosevic/root,agarciamontoro/root,dfunke/root,esakellari/root,veprbl/root,bbockelm/root,perovic/root,Duraznos/root,davidlt/root,CristinaCristescu/root,esakellari/my_root_for_test,Duraznos/root,omazapa/root,thomaskeck/root,jrtomps/root,sawenzel/root,evgeny-boger/root,CristinaCristescu/root,mhuwiler/rootauto,karies/root,davidlt/root,pspe/root,olifre/root,0x0all/ROOT,root-mirror/root,satyarth934/root,sawenzel/root,BerserkerTroll/root,Duraznos/root,BerserkerTroll/root,gbitzes/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,dfunke/root,davidlt/root,evgeny-boger/root,lgiommi/root,krafczyk/root,simonpf/root,Y--/root,zzxuanyuan/root,esakellari/my_root_for_test,CristinaCristescu/root,mhuwiler/rootauto,evgeny-boger/root,agarciamontoro/root,mhuwiler/rootauto,georgtroska/root,beniz/root,arch1tect0r/root,simonpf/root,dfunke/root,mattkretz/root,Duraznos/root,satyarth934/root,sirinath/root,0x0all/ROOT,sirinath/root,CristinaCristescu/root,abhinavmoudgil95/root,perovic/root,pspe/root,nilqed/root,karies/root,krafczyk/root,agarciamontoro/root,mkret2/root,davidlt/root,perovic/root,mattkretz/root,omazapa/root,davidlt/root,Y--/root,simonpf/root,lgiommi/root,Duraznos/root,jrtomps/root,abhinavmoudgil95/root,mkret2/root,omazapa/root,perovic/root,veprbl/root,sbinet/cxx-root,gbitzes/root,sirinath/root,zzxuanyuan/root,veprbl/root,simonpf/root,root-mirror/root,olifre/root,BerserkerTroll/root,nilqed/root,sirinath/root,vukasinmilosevic/root,simonpf/root,omazapa/root,olifre/root,gganis/root,bbockelm/root,beniz/root,nilqed/root,perovic/root,beniz/root,gbitzes/root,nilqed/root,olifre/root,esakellari/root,buuck/root,perovic/root,sawenzel/root,buuck/root,mattkretz/root,karies/root,georgtroska/root,mhuwiler/rootauto,satyarth934/root,bbockelm/root,nilqed/root,veprbl/root,omazapa/root-old,satyarth934/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,perovic/root,jrtomps/root,gganis/root,esakellari/root,BerserkerTroll/root,krafczyk/root,olifre/root,karies/root,BerserkerTroll/root,beniz/root,BerserkerTroll/root,nilqed/root,krafczyk/root,dfunke/root,buuck/root,omazapa/root,omazapa/root,bbockelm/root,beniz/root,abhinavmoudgil95/root,lgiommi/root,sirinath/root,esakellari/my_root_for_test,dfunke/root,esakellari/my_root_for_test,mattkretz/root,arch1tect0r/root,vukasinmilosevic/root,pspe/root,veprbl/root,evgeny-boger/root,pspe/root,sawenzel/root,0x0all/ROOT,thomaskeck/root,evgeny-boger/root,davidlt/root,thomaskeck/root,mhuwiler/rootauto,BerserkerTroll/root,agarciamontoro/root,arch1tect0r/root,gganis/root,Y--/root,mkret2/root,arch1tect0r/root,sbinet/cxx-root,esakellari/my_root_for_test,gbitzes/root,gbitzes/root,beniz/root,thomaskeck/root,jrtomps/root,sawenzel/root,sawenzel/root,Y--/root,evgeny-boger/root,beniz/root,zzxuanyuan/root-compressor-dummy,davidlt/root,krafczyk/root,mkret2/root,olifre/root,agarciamontoro/root,krafczyk/root,dfunke/root,perovic/root,arch1tect0r/root,veprbl/root,omazapa/root,BerserkerTroll/root,mattkretz/root,thomaskeck/root,vukasinmilosevic/root,simonpf/root,olifre/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,olifre/root,BerserkerTroll/root,karies/root,mkret2/root,sbinet/cxx-root,jrtomps/root,sbinet/cxx-root,mattkretz/root,lgiommi/root,gganis/root,vukasinmilosevic/root,sawenzel/root,arch1tect0r/root,abhinavmoudgil95/root,Duraznos/root,buuck/root,vukasinmilosevic/root,gganis/root,thomaskeck/root,esakellari/my_root_for_test,davidlt/root,zzxuanyuan/root-compressor-dummy,sirinath/root,agarciamontoro/root,sawenzel/root,davidlt/root,sbinet/cxx-root,vukasinmilosevic/root,mattkretz/root,gbitzes/root,sirinath/root,buuck/root,mkret2/root,zzxuanyuan/root,simonpf/root,karies/root,thomaskeck/root,esakellari/root,buuck/root,jrtomps/root,omazapa/root-old,simonpf/root,root-mirror/root,zzxuanyuan/root,CristinaCristescu/root,omazapa/root,nilqed/root,mhuwiler/rootauto,thomaskeck/root,abhinavmoudgil95/root,esakellari/root,zzxuanyuan/root,Duraznos/root,sawenzel/root,pspe/root,omazapa/root-old,Y--/root,nilqed/root,zzxuanyuan/root,olifre/root,gbitzes/root,omazapa/root,pspe/root,pspe/root,jrtomps/root,mkret2/root,sbinet/cxx-root,0x0all/ROOT,bbockelm/root,satyarth934/root,CristinaCristescu/root,gbitzes/root,buuck/root,beniz/root,lgiommi/root,omazapa/root,simonpf/root,agarciamontoro/root,omazapa/root-old,abhinavmoudgil95/root,mhuwiler/rootauto,nilqed/root,satyarth934/root,sawenzel/root,omazapa/root-old,root-mirror/root,abhinavmoudgil95/root,georgtroska/root,evgeny-boger/root,abhinavmoudgil95/root,gganis/root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,thomaskeck/root,vukasinmilosevic/root,dfunke/root,abhinavmoudgil95/root,Y--/root,lgiommi/root,jrtomps/root,zzxuanyuan/root,beniz/root,root-mirror/root,mhuwiler/rootauto,sbinet/cxx-root,esakellari/root,simonpf/root,bbockelm/root,root-mirror/root,esakellari/my_root_for_test,pspe/root,evgeny-boger/root,Duraznos/root,mhuwiler/rootauto,Y--/root,lgiommi/root,arch1tect0r/root,olifre/root,gbitzes/root,esakellari/my_root_for_test,CristinaCristescu/root,omazapa/root-old,CristinaCristescu/root,root-mirror/root,davidlt/root,gganis/root,esakellari/my_root_for_test,arch1tect0r/root,esakellari/root,nilqed/root,perovic/root,omazapa/root-old,0x0all/ROOT,sirinath/root,perovic/root,karies/root,agarciamontoro/root,omazapa/root-old,mattkretz/root,georgtroska/root,gbitzes/root,esakellari/my_root_for_test,buuck/root,bbockelm/root,karies/root,esakellari/root,krafczyk/root,arch1tect0r/root,jrtomps/root,georgtroska/root,veprbl/root,jrtomps/root,karies/root,bbockelm/root,omazapa/root-old,evgeny-boger/root,esakellari/root,omazapa/root-old,mkret2/root,beniz/root,buuck/root,zzxuanyuan/root-compressor-dummy,veprbl/root,georgtroska/root,sirinath/root,karies/root,root-mirror/root,0x0all/ROOT,CristinaCristescu/root,zzxuanyuan/root,0x0all/ROOT,Y--/root,perovic/root,sbinet/cxx-root,lgiommi/root,abhinavmoudgil95/root,georgtroska/root,bbockelm/root,BerserkerTroll/root,omazapa/root,krafczyk/root,nilqed/root,sirinath/root,esakellari/root,Duraznos/root,olifre/root,mattkretz/root,sawenzel/root,vukasinmilosevic/root,Y--/root,georgtroska/root,sbinet/cxx-root,mhuwiler/rootauto,lgiommi/root,veprbl/root,gganis/root,satyarth934/root,lgiommi/root,zzxuanyuan/root,krafczyk/root,gganis/root,dfunke/root,arch1tect0r/root,mkret2/root,agarciamontoro/root,esakellari/root,pspe/root,satyarth934/root,Duraznos/root,buuck/root,root-mirror/root,root-mirror/root,dfunke/root,mattkretz/root,thomaskeck/root,mhuwiler/rootauto,krafczyk/root,zzxuanyuan/root,pspe/root,jrtomps/root,georgtroska/root,mkret2/root,mkret2/root,zzxuanyuan/root,georgtroska/root,BerserkerTroll/root,simonpf/root,root-mirror/root,evgeny-boger/root,gbitzes/root,buuck/root,0x0all/ROOT,georgtroska/root,Duraznos/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,Y--/root,krafczyk/root,karies/root,abhinavmoudgil95/root,Y--/root,veprbl/root,gganis/root,zzxuanyuan/root-compressor-dummy,0x0all/ROOT |
72667ea922ed9b703b56a87cd71844b74801cd55 | common/c_cpp/src/c/windows/wombat/wUuid.h | common/c_cpp/src/c/windows/wombat/wUuid.h | /* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef WUUID_H__
#define WUUID_H__
#include "wombat/port.h"
typedef int wUuid;
COMMONExpDLL
void wUuid_generate_time (wUuid myUuid);
COMMONExpDLL
void wUuid_unparse (wUuid myUuid, char* out);
#endif /* WUUID_H__ */
| /* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef WUUID_H__
#define WUUID_H__
#include "wombat/port.h"
typedef char* wUuid;
COMMONExpDLL
void wUuid_generate_time (wUuid myUuid);
COMMONExpDLL
void wUuid_unparse (wUuid myUuid, char* out);
#endif /* WUUID_H__ */
| Change uuid to char* from int for Windows | Change uuid to char* from int for Windows
Signed-off-by: Mike Schonberg <[email protected]>
| C | lgpl-2.1 | MattMulhern/OpenMamaCassandra,jacobraj/MAMA,MattMulhern/OpenMamaCassandra,dmaguire/OpenMAMA,dpauls/OpenMAMA,philippreston/OpenMAMA,jacobraj/MAMA,jacobraj/MAMA,fquinner/OpenMAMA,jacobraj/MAMA,vulcanft/openmama,dmaguire/OpenMAMA,cloudsmith-io/openmama,MattMulhern/OpenMamaCassandra,dmagOM/OpenMAMA-dynamic,dmagOM/OpenMAMA-dynamic,MattMulhern/OpenMamaCassandra,fquinner/OpenMAMA,cloudsmith-io/openmama,dmaguire/OpenMAMA,fquinner/OpenMAMA,cloudsmith-io/openmama,MattMulhern/OpenMAMA,jacobraj/MAMA,fquinner/OpenMAMA,philippreston/OpenMAMA,philippreston/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,cloudsmith-io/openmama,kuangtu/OpenMAMA,kuangtu/OpenMAMA,cloudsmith-io/openmama,philippreston/OpenMAMA,dmagOM/OpenMAMA-dynamic,MattMulhern/OpenMAMA,kuangtu/OpenMAMA,vulcanft/openmama,fquinner/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,dmaguire/OpenMAMA,MattMulhern/OpenMAMA,MattMulhern/OpenMamaCassandra,MattMulhern/OpenMAMA,philippreston/OpenMAMA,kuangtu/OpenMAMA,vulcanft/openmama,dpauls/OpenMAMA,philippreston/OpenMAMA,fquinner/OpenMAMA,jacobraj/MAMA,cloudsmith-io/openmama,cloudsmith-io/openmama,philippreston/OpenMAMA,MattMulhern/OpenMAMA,dmaguire/OpenMAMA,MattMulhern/OpenMAMA,dmagOM/OpenMAMA-dynamic,dpauls/OpenMAMA,MattMulhern/OpenMamaCassandra,kuangtu/OpenMAMA,kuangtu/OpenMAMA,MattMulhern/OpenMAMA,dmaguire/OpenMAMA,kuangtu/OpenMAMA,dmagOM/OpenMAMA-dynamic,fquinner/OpenMAMA,dmagOM/OpenMAMA-dynamic,dpauls/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,vulcanft/openmama,dmaguire/OpenMAMA |
a129bc76b0b47ec732e2229dda4165bae8083e2a | tests/regression/13-privatized/31-traces-mine-vs-mutex.c | tests/regression/13-privatized/31-traces-mine-vs-mutex.c | // Copied & modified from 13/28.
#include <pthread.h>
#include <assert.h>
int g;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
g++;
pthread_mutex_unlock(&B); // Write Mine influence: [[g, B], t2_fun, {A}] -> 1
pthread_mutex_lock(&B);
g--;
pthread_mutex_unlock(&B); // Write Mine influence: [[g, B], t2_fun, {A}] -> 0
pthread_mutex_unlock(&A);
return NULL;
}
int main(void) {
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&B); // Read & join to g Mine influence: [[g, B], t2_fun, {A}] -> (0 join 1 = Unknown)
pthread_mutex_unlock(&B);
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
assert(g == 0);
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&A);
pthread_join(id, NULL);
return 0;
} | Add cleaned up example where mine and mutex-* differ | Add cleaned up example where mine and mutex-* differ
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
588c5e4b6f5fa8e45811d3f4e95d3b94f8f58341 | test/tools/llvm-symbolizer/print_context.c | test/tools/llvm-symbolizer/print_context.c | // REQUIRES: x86_64-linux
// RUN: %host_cc -O0 -g %s -o %t 2>&1
// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
#include <stdio.h>
int inc(int a) {
return a + 1;
}
int main() {
printf("%p\n", inc);
return 0;
}
// CHECK: inc
// CHECK: print_context.c:7
// CHECK: 5 : #include
// CHECK: 6 :
// CHECK: 7 >: int inc
// CHECK: 8 : return
// CHECK: 9 : }
| // REQUIRES: x86_64-linux
// RUN: %host_cc -O0 -g %s -o %t 2>&1
// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
//
// See PR31870 for more details on the XFAIL
// XFAIL: avr
#include <stdio.h>
int inc(int a) {
return a + 1;
}
int main() {
printf("%p\n", inc);
return 0;
}
// CHECK: inc
// CHECK: print_context.c:7
// CHECK: 5 : #include
// CHECK: 6 :
// CHECK: 7 >: int inc
// CHECK: 8 : return
// CHECK: 9 : }
| Mark a failing symbolizer test as XFAIL | [AVR] Mark a failing symbolizer test as XFAIL
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@309512 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm |
c84ea433d725db190e6e2e51344ec055422414fe | src/include/port/win.h | src/include/port/win.h | #define JMP_BUF
#define HAS_TEST_AND_SET
typedef unsigned char slock_t;
#ifndef O_DIROPEN
#define O_DIROPEN 0x100000 /* should be in sys/fcntl.h */
#endif
| #define JMP_BUF
#define HAS_TEST_AND_SET
typedef unsigned char slock_t;
#ifndef O_DIROPEN
#define O_DIROPEN 0x100000 /* should be in sys/fcntl.h */
#endif
#define tzname _tzname /* should be in time.h?*/
#define USE_POSIX_TIME
#define HAVE_INT_TIMEZONE /* has int _timezone */
| Fix from Yutaka Tanida <[email protected]> | Fix from Yutaka Tanida <[email protected]>
| C | apache-2.0 | xuegang/gpdb,ahachete/gpdb,kaknikhil/gpdb,Postgres-XL/Postgres-XL,yuanzhao/gpdb,foyzur/gpdb,CraigHarris/gpdb,janebeckman/gpdb,adam8157/gpdb,chrishajas/gpdb,janebeckman/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,randomtask1155/gpdb,atris/gpdb,atris/gpdb,zaksoup/gpdb,janebeckman/gpdb,lintzc/gpdb,zaksoup/gpdb,zaksoup/gpdb,rubikloud/gpdb,ashwinstar/gpdb,foyzur/gpdb,Chibin/gpdb,Chibin/gpdb,zeroae/postgres-xl,kmjungersen/PostgresXL,50wu/gpdb,lintzc/gpdb,randomtask1155/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,50wu/gpdb,postmind-net/postgres-xl,Quikling/gpdb,ovr/postgres-xl,lisakowen/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,snaga/postgres-xl,edespino/gpdb,arcivanov/postgres-xl,zaksoup/gpdb,Postgres-XL/Postgres-XL,Quikling/gpdb,randomtask1155/gpdb,rvs/gpdb,rubikloud/gpdb,postmind-net/postgres-xl,yuanzhao/gpdb,techdragon/Postgres-XL,atris/gpdb,cjcjameson/gpdb,ahachete/gpdb,greenplum-db/gpdb,xuegang/gpdb,lintzc/gpdb,Postgres-XL/Postgres-XL,ovr/postgres-xl,zeroae/postgres-xl,royc1/gpdb,yazun/postgres-xl,randomtask1155/gpdb,kaknikhil/gpdb,greenplum-db/gpdb,lintzc/gpdb,xinzweb/gpdb,lpetrov-pivotal/gpdb,tangp3/gpdb,royc1/gpdb,kmjungersen/PostgresXL,royc1/gpdb,tangp3/gpdb,Chibin/gpdb,50wu/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,atris/gpdb,CraigHarris/gpdb,50wu/gpdb,ashwinstar/gpdb,edespino/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,janebeckman/gpdb,rvs/gpdb,tpostgres-projects/tPostgres,randomtask1155/gpdb,tangp3/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,Quikling/gpdb,ahachete/gpdb,adam8157/gpdb,edespino/gpdb,foyzur/gpdb,oberstet/postgres-xl,xinzweb/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,yuanzhao/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,yuanzhao/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,snaga/postgres-xl,janebeckman/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,foyzur/gpdb,rvs/gpdb,0x0FFF/gpdb,xinzweb/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,kaknikhil/gpdb,royc1/gpdb,greenplum-db/gpdb,tangp3/gpdb,chrishajas/gpdb,lintzc/gpdb,greenplum-db/gpdb,royc1/gpdb,postmind-net/postgres-xl,arcivanov/postgres-xl,adam8157/gpdb,randomtask1155/gpdb,tpostgres-projects/tPostgres,Chibin/gpdb,ovr/postgres-xl,xuegang/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,lisakowen/gpdb,randomtask1155/gpdb,rvs/gpdb,Quikling/gpdb,xuegang/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,CraigHarris/gpdb,yazun/postgres-xl,ashwinstar/gpdb,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,royc1/gpdb,rvs/gpdb,kmjungersen/PostgresXL,postmind-net/postgres-xl,oberstet/postgres-xl,0x0FFF/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,zaksoup/gpdb,yazun/postgres-xl,ashwinstar/gpdb,kaknikhil/gpdb,randomtask1155/gpdb,tangp3/gpdb,foyzur/gpdb,chrishajas/gpdb,kmjungersen/PostgresXL,chrishajas/gpdb,yuanzhao/gpdb,ahachete/gpdb,snaga/postgres-xl,royc1/gpdb,Quikling/gpdb,zaksoup/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,Chibin/gpdb,techdragon/Postgres-XL,yuanzhao/gpdb,xuegang/gpdb,Quikling/gpdb,rubikloud/gpdb,edespino/gpdb,zaksoup/gpdb,oberstet/postgres-xl,Chibin/gpdb,lintzc/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,Chibin/gpdb,cjcjameson/gpdb,lisakowen/gpdb,0x0FFF/gpdb,techdragon/Postgres-XL,zaksoup/gpdb,chrishajas/gpdb,edespino/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,0x0FFF/gpdb,xinzweb/gpdb,cjcjameson/gpdb,rvs/gpdb,arcivanov/postgres-xl,CraigHarris/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,xinzweb/gpdb,snaga/postgres-xl,rubikloud/gpdb,edespino/gpdb,Quikling/gpdb,rubikloud/gpdb,xuegang/gpdb,janebeckman/gpdb,Quikling/gpdb,snaga/postgres-xl,rvs/gpdb,ovr/postgres-xl,50wu/gpdb,lintzc/gpdb,chrishajas/gpdb,foyzur/gpdb,lisakowen/gpdb,CraigHarris/gpdb,pavanvd/postgres-xl,atris/gpdb,adam8157/gpdb,adam8157/gpdb,rubikloud/gpdb,pavanvd/postgres-xl,zeroae/postgres-xl,edespino/gpdb,Postgres-XL/Postgres-XL,ahachete/gpdb,lisakowen/gpdb,greenplum-db/gpdb,adam8157/gpdb,tpostgres-projects/tPostgres,atris/gpdb,zeroae/postgres-xl,rubikloud/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,0x0FFF/gpdb,tangp3/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,yazun/postgres-xl,xuegang/gpdb,arcivanov/postgres-xl,oberstet/postgres-xl,royc1/gpdb,jmcatamney/gpdb,janebeckman/gpdb,zeroae/postgres-xl,lintzc/gpdb,atris/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,tpostgres-projects/tPostgres,tpostgres-projects/tPostgres,janebeckman/gpdb,chrishajas/gpdb,Quikling/gpdb,Chibin/gpdb,kaknikhil/gpdb,ahachete/gpdb,lintzc/gpdb,rvs/gpdb,jmcatamney/gpdb,foyzur/gpdb,Chibin/gpdb,cjcjameson/gpdb,edespino/gpdb,kaknikhil/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,cjcjameson/gpdb,Chibin/gpdb,rvs/gpdb,50wu/gpdb,CraigHarris/gpdb,Quikling/gpdb,tangp3/gpdb,ahachete/gpdb,foyzur/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,yazun/postgres-xl,kaknikhil/gpdb,ahachete/gpdb,rubikloud/gpdb,rvs/gpdb,janebeckman/gpdb,ovr/postgres-xl,janebeckman/gpdb,cjcjameson/gpdb |
03b8a58e6b8fbfcdbe8bad02e4d0cda0f372972c | rflags.c | rflags.c | #include <inttypes.h>
#include <stdio.h>
int main()
{
uint64_t rflags;
__asm__ __volatile__ ("pushf; popq %0" : "=g" (rflags) ::"memory");
printf("rFLAGS: %016llx\n", rflags);
#define BIT(name, number) \
printf("\t%s: %d\n", name, rflags & (1 << number) ? 1 : 0)
const char* bits[] = {
"CF",
"Reserved (1)",
"PF",
"Reserved (0)",
"AF",
"Reserved (0)",
"ZF (Zero)",
"SF (Sign)",
"TF (Trap)",
"IF (Interrupt)",
"DF (Direction)",
"OF (Overflow)",
"IOPL LSB",
"IOPL MSB",
"NT"
};
int i;
for (i=0;i<sizeof(bits)/sizeof(*bits);i++)
BIT(bits[i], i);
}
| #include <inttypes.h>
#include <stdio.h>
int main()
{
uint64_t rflags;
__asm__ __volatile__ ("pushf; popq %0" : "=g" (rflags) ::"memory");
printf("rFLAGS: %016llx\n", (unsigned long long)rflags);
#define BIT(name, number) \
printf("\t%s: %d\n", name, rflags & (1 << number) ? 1 : 0)
const char* bits[] = {
"CF",
"Reserved (1)",
"PF",
"Reserved (0)",
"AF",
"Reserved (0)",
"ZF (Zero)",
"SF (Sign)",
"TF (Trap)",
"IF (Interrupt)",
"DF (Direction)",
"OF (Overflow)",
"IOPL LSB",
"IOPL MSB",
"NT"
};
int i;
for (i=0;i<sizeof(bits)/sizeof(*bits);i++)
BIT(bits[i], i);
}
| Fix printf warning when long long is 128-bit. | Fix printf warning when long long is 128-bit.
| C | mit | olsner/os,olsner/os,olsner/os,olsner/os |
a6ff25d87ab0d21c433390b80b513c46b6570f9c | include/config/SkUserConfigManual.h | include/config/SkUserConfigManual.h | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h"
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
#define SK_DISABLE_RENDER_TARGET_SORTING
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
#define SK_SUPPORT_LEGACY_PAINT_TEXTMEASURE
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_A8_MASKBLITTER
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#endif // SkUserConfigManual_DEFINED
| /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
#define SK_DISABLE_RENDER_TARGET_SORTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
#define SK_SUPPORT_LEGACY_PAINT_TEXTMEASURE
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_A8_MASKBLITTER
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#endif // SkUserConfigManual_DEFINED
| Stop using Chrome config options. | Stop using Chrome config options.
These options used to apply some best practices for how to configure
Skia but those have been moved to GrContext options and this file is
now mostly optimizations specific to the Chrome rendering pipeline.
Specifically, we don't want to use VBOs on all classes of GPUs as it
can be much more efficient to allocate them on the CPU and pass the
allocation to the driver.
Bug: 119222339
Test: CTS passes and systrace shows increased performance
Change-Id: I1d495a4ae8de99215d6be1ac1e7e01b1263af9f1
| C | bsd-3-clause | aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia |
34e2799c7b628cb4f22400349e166ef66aaea99b | solutions/uri/1005/1005.c | solutions/uri/1005/1005.c | #include <stdio.h>
int main() {
float a, b;
scanf("%f", &a);
scanf("%f", &b);
printf("MEDIA = %.5f\n", (a * 3.5 + b * 7.5) / 11.0);
return 0;
}
| Solve Average 1 in c | Solve Average 1 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 |
|
ff8d8029fdfa0b28c67012b8fcddb4e2d9a2523d | src/host/os_rmdir.c | src/host/os_rmdir.c | /**
* \file os_rmdir.c
* \brief Remove a subdirectory.
* \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
*/
#include <stdlib.h>
#include "premake.h"
int os_rmdir(lua_State* L)
{
int z;
const char* path = luaL_checkstring(L, 1);
#if PLATFORM_WINDOWS
z = RemoveDirectory(path);
#else
z = rmdir(path);
#endif
if (!z)
{
lua_pushnil(L);
lua_pushfstring(L, "unable to remove directory '%s'", path);
return 2;
}
else
{
lua_pushboolean(L, 1);
return 1;
}
}
| /**
* \file os_rmdir.c
* \brief Remove a subdirectory.
* \author Copyright (c) 2002-2013 Jason Perkins and the Premake project
*/
#include <stdlib.h>
#include "premake.h"
int os_rmdir(lua_State* L)
{
int z;
const char* path = luaL_checkstring(L, 1);
#if PLATFORM_WINDOWS
z = RemoveDirectory(path);
#else
z = (0 == rmdir(path));
#endif
if (!z)
{
lua_pushnil(L);
lua_pushfstring(L, "unable to remove directory '%s'", path);
return 2;
}
else
{
lua_pushboolean(L, 1);
return 1;
}
}
| Fix error result handling in os.rmdir() | Fix error result handling in os.rmdir()
| C | bsd-3-clause | Yhgenomics/premake-core,felipeprov/premake-core,sleepingwit/premake-core,xriss/premake-core,bravnsgaard/premake-core,grbd/premake-core,PlexChat/premake-core,prapin/premake-core,soundsrc/premake-core,prapin/premake-core,prapin/premake-core,jsfdez/premake-core,sleepingwit/premake-core,resetnow/premake-core,LORgames/premake-core,sleepingwit/premake-core,PlexChat/premake-core,noresources/premake-core,Blizzard/premake-core,soundsrc/premake-core,Meoo/premake-core,lizh06/premake-core,resetnow/premake-core,tvandijck/premake-core,TurkeyMan/premake-core,sleepingwit/premake-core,martin-traverse/premake-core,felipeprov/premake-core,jstewart-amd/premake-core,LORgames/premake-core,jsfdez/premake-core,aleksijuvani/premake-core,mendsley/premake-core,Meoo/premake-core,LORgames/premake-core,martin-traverse/premake-core,soundsrc/premake-core,premake/premake-core,resetnow/premake-core,mandersan/premake-core,lizh06/premake-core,starkos/premake-core,starkos/premake-core,premake/premake-core,mendsley/premake-core,noresources/premake-core,Blizzard/premake-core,alarouche/premake-core,TurkeyMan/premake-core,saberhawk/premake-core,TurkeyMan/premake-core,prapin/premake-core,alarouche/premake-core,Yhgenomics/premake-core,mandersan/premake-core,CodeAnxiety/premake-core,tritao/premake-core,dcourtois/premake-core,mandersan/premake-core,alarouche/premake-core,Meoo/premake-core,mendsley/premake-core,dcourtois/premake-core,Blizzard/premake-core,noresources/premake-core,bravnsgaard/premake-core,Blizzard/premake-core,soundsrc/premake-core,jstewart-amd/premake-core,Blizzard/premake-core,dcourtois/premake-core,dcourtois/premake-core,jsfdez/premake-core,sleepingwit/premake-core,akaStiX/premake-core,premake/premake-core,Tiger66639/premake-core,Zefiros-Software/premake-core,grbd/premake-core,saberhawk/premake-core,aleksijuvani/premake-core,PlexChat/premake-core,CodeAnxiety/premake-core,Zefiros-Software/premake-core,tvandijck/premake-core,alarouche/premake-core,Meoo/premake-core,jsfdez/premake-core,grbd/premake-core,Tiger66639/premake-core,starkos/premake-core,starkos/premake-core,tritao/premake-core,Yhgenomics/premake-core,xriss/premake-core,kankaristo/premake-core,bravnsgaard/premake-core,xriss/premake-core,Zefiros-Software/premake-core,dcourtois/premake-core,saberhawk/premake-core,felipeprov/premake-core,premake/premake-core,premake/premake-core,mandersan/premake-core,grbd/premake-core,akaStiX/premake-core,starkos/premake-core,Tiger66639/premake-core,jstewart-amd/premake-core,tvandijck/premake-core,noresources/premake-core,tritao/premake-core,martin-traverse/premake-core,kankaristo/premake-core,noresources/premake-core,TurkeyMan/premake-core,jstewart-amd/premake-core,resetnow/premake-core,Zefiros-Software/premake-core,aleksijuvani/premake-core,xriss/premake-core,tvandijck/premake-core,saberhawk/premake-core,PlexChat/premake-core,bravnsgaard/premake-core,dcourtois/premake-core,jstewart-amd/premake-core,premake/premake-core,tritao/premake-core,mandersan/premake-core,Zefiros-Software/premake-core,mendsley/premake-core,martin-traverse/premake-core,noresources/premake-core,resetnow/premake-core,CodeAnxiety/premake-core,xriss/premake-core,TurkeyMan/premake-core,CodeAnxiety/premake-core,bravnsgaard/premake-core,felipeprov/premake-core,Tiger66639/premake-core,akaStiX/premake-core,akaStiX/premake-core,LORgames/premake-core,lizh06/premake-core,LORgames/premake-core,soundsrc/premake-core,CodeAnxiety/premake-core,Blizzard/premake-core,premake/premake-core,aleksijuvani/premake-core,starkos/premake-core,starkos/premake-core,kankaristo/premake-core,Yhgenomics/premake-core,dcourtois/premake-core,kankaristo/premake-core,tvandijck/premake-core,noresources/premake-core,mendsley/premake-core,aleksijuvani/premake-core,lizh06/premake-core |
f3bbcec5d714f9d457c99032e5b02c75d44b0d70 | lib/StaticAnalyzer/Checkers/SelectorExtras.h | lib/StaticAnalyzer/Checkers/SelectorExtras.h | //=== SelectorExtras.h - Helpers for checkers using selectors -----*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_SELECTOREXTRAS_H
#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_SELECTOREXTRAS_H
#include "clang/AST/ASTContext.h"
namespace clang {
namespace ento {
template <typename... IdentifierInfos>
static inline Selector getKeywordSelector(ASTContext &Ctx,
IdentifierInfos *... IIs) {
static_assert(sizeof...(IdentifierInfos),
"keyword selectors must have at least one argument");
SmallVector<IdentifierInfo *, 10> II{{&Ctx.Idents.get(IIs)...}};
return Ctx.Selectors.getSelector(II.size(), &II[0]);
}
template <typename... IdentifierInfos>
static inline void lazyInitKeywordSelector(Selector &Sel, ASTContext &Ctx,
IdentifierInfos *... IIs) {
if (!Sel.isNull())
return;
Sel = getKeywordSelector(Ctx, IIs...);
}
static inline void lazyInitNullarySelector(Selector &Sel, ASTContext &Ctx,
const char *Name) {
if (!Sel.isNull())
return;
Sel = GetNullarySelector(Name, Ctx);
}
} // end namespace ento
} // end namespace clang
#endif
| //=== SelectorExtras.h - Helpers for checkers using selectors -----*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_SELECTOREXTRAS_H
#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_SELECTOREXTRAS_H
#include "clang/AST/ASTContext.h"
namespace clang {
namespace ento {
template <typename... IdentifierInfos>
static inline Selector getKeywordSelector(ASTContext &Ctx,
IdentifierInfos *... IIs) {
static_assert(sizeof...(IdentifierInfos),
"keyword selectors must have at least one argument");
SmallVector<IdentifierInfo *, 10> II({&Ctx.Idents.get(IIs)...});
return Ctx.Selectors.getSelector(II.size(), &II[0]);
}
template <typename... IdentifierInfos>
static inline void lazyInitKeywordSelector(Selector &Sel, ASTContext &Ctx,
IdentifierInfos *... IIs) {
if (!Sel.isNull())
return;
Sel = getKeywordSelector(Ctx, IIs...);
}
static inline void lazyInitNullarySelector(Selector &Sel, ASTContext &Ctx,
const char *Name) {
if (!Sel.isNull())
return;
Sel = GetNullarySelector(Name, Ctx);
}
} // end namespace ento
} // end namespace clang
#endif
| Use clang++-3.5 compatible initializer_list constructor | Use clang++-3.5 compatible initializer_list constructor
Otherwise, a warning is issued.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@302654 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang |
3e5585d5a558396d52380478c2d85aeb954f4b43 | src/rtcmix/rtdefs.h | src/rtcmix/rtdefs.h | /* To avoid recursion in certain includes */
#ifndef _RTDEFS_H_
#define _RTDEFS_H_ 1
#define MAXCHANS 4
#define MAX_INPUT_FDS 128
#define AUDIO_DEVICE 9999999
/* definition of input file desc struct used by rtinput */
typedef struct inputdesc {
char filename[1024];
int fd;
int refcount;
#ifdef USE_SNDLIB
short header_type; /* e.g., AIFF_sound_file (in sndlib.h) */
short data_format; /* e.g., snd_16_linear (in sndlib.h) */
#else
#ifdef sgi
void *handle;
#endif
#endif
int data_location; /* offset of sound data start in file */
float dur;
} InputDesc;
extern float *outbuff;
extern float *outbptr;
extern short *inbuff; // DT: for use with real-time audio input
// NOTE: MAXBUF is a constant in SGI version!
extern int MAXBUF;
#ifdef _LANGUAGE_C_PLUS_PLUS /* Needed for MIPSpro */
extern "C" {
#endif
extern float SR;
extern int NCHANS;
extern int RTBUFSAMPS;
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* _RTDEFS_H_ */
| /* To avoid recursion in certain includes */
#ifndef _RTDEFS_H_
#define _RTDEFS_H_ 1
#define MAXCHANS 4
#define MAX_INPUT_FDS 128
#define AUDIO_DEVICE 9999999
/* definition of input file desc struct used by rtinput */
typedef struct inputdesc {
char filename[1024];
int fd;
int refcount;
#ifdef USE_SNDLIB
short header_type; /* e.g., AIFF_sound_file (in sndlib.h) */
short data_format; /* e.g., snd_16_linear (in sndlib.h) */
#else
#ifdef sgi
void *handle;
#endif
#endif
int data_location; /* offset of sound data start in file */
float dur;
} InputDesc;
/* for insts - so they don't have to include globals.h */
extern int MAXBUF;
extern int NCHANS;
extern int RTBUFSAMPS;
extern float SR;
#endif /* _RTDEFS_H_ */
| Move some globals to globals.h. | Move some globals to globals.h.
| C | apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix |
8d89c3c0d8b5e9c5aed145d25343e04a4b81c156 | driver/fingerprint/fpsensor.h | driver/fingerprint/fpsensor.h | /* Copyright 2019 The Chromium OS 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 __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_
#define __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_
#if defined(HAVE_PRIVATE) && !defined(TEST_BUILD)
#define HAVE_FP_PRIVATE_DRIVER
#include "fpc/fpc_sensor.h"
#else
/* These values are used by the host (emulator) tests. */
#define FP_SENSOR_IMAGE_SIZE 0
#define FP_SENSOR_RES_X 0
#define FP_SENSOR_RES_Y 0
#define FP_ALGORITHM_TEMPLATE_SIZE 0
#define FP_MAX_FINGER_COUNT 5
#endif
#ifdef TEST_BUILD
/* This represents the mock of the private */
#define HAVE_FP_PRIVATE_DRIVER
#endif
#endif /* __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_ */
| /* Copyright 2019 The Chromium OS 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 __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_
#define __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_
#if defined(HAVE_PRIVATE) && !defined(EMU_BUILD)
#define HAVE_FP_PRIVATE_DRIVER
#include "fpc/fpc_sensor.h"
#else
/* These values are used by the host (emulator) tests. */
#define FP_SENSOR_IMAGE_SIZE 0
#define FP_SENSOR_RES_X 0
#define FP_SENSOR_RES_Y 0
#define FP_ALGORITHM_TEMPLATE_SIZE 0
#define FP_MAX_FINGER_COUNT 5
#endif
#ifdef TEST_BUILD
/* This represents the mock of the private */
#define HAVE_FP_PRIVATE_DRIVER
#endif
#endif /* __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_ */
| Exclude header on emulator build, not test build | driver/fingerprint: Exclude header on emulator build, not test build
Now that we run unit tests on device, we want to be able to include the
fingerprint sensor headers in test builds.
BRANCH=none
BUG=b:76037094
TEST=make buildall -j
TEST=With dragonclaw v0.2 connected to Segger J-Trace and servo micro:
./test/run_device_tests.py
Signed-off-by: Tom Hughes <[email protected]>
Change-Id: Id406fd6039f1136f2ae8743453ead4a951805db5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2321827
Reviewed-by: Yicheng Li <[email protected]>
| C | bsd-3-clause | coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec |
a3fadc72e797ba8494eb6641a677364e82b08584 | 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);
ListNode* ListNode_Create(void* k);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (f)(void*, void*));
void List_Insert(List* l, ListNode* n);
void List_Delete(List* l, ListNode* n);
#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* k);
void* ListNode_Retrieve(ListNode* n);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (f)(void*, void*));
void List_Insert(List* l, ListNode* n);
void List_Delete(List* l, ListNode* n);
#endif | Add List Node Retrieve function declaration | Add List Node Retrieve function declaration
Function to retrieve key from any List Node
| C | mit | MaxLikelihood/CADT |
76c1534e0bd78e9a7662edcf5c994bac63d939fd | drivers/scsi/qla2xxx/qla_version.h | drivers/scsi/qla2xxx/qla_version.h | /*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2005 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.01.05-k2"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 1
#define QLA_DRIVER_PATCH_VER 5
#define QLA_DRIVER_BETA_VER 0
| /*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2005 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.01.05-k3"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 1
#define QLA_DRIVER_PATCH_VER 5
#define QLA_DRIVER_BETA_VER 0
| Update version number to 8.01.05-k3. | [SCSI] qla2xxx: Update version number to 8.01.05-k3.
Signed-off-by: Andrew Vasquez <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
| C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas |
deae63efe7c5469c68e451f30c23296bb67b80d6 | www/db.h | www/db.h | /*
* db.h
*
* Copyright (C) 2011 OpenTech Labs
* Andrew Clayton <[email protected]>
* Released under the GNU General Public License (GPL) version 3.
* See COPYING
*/
#ifndef _DB_H_
#define _DB_H_
/* For Tokyocabinet (user sessions) */
#include <tcutil.h>
#include <tctdb.h>
#include <stdbool.h>
#include <stdint.h>
#include <libgen.h>
/* MySQL */
#include <my_global.h>
#include <mysql.h>
MYSQL *db_conn(void);
#endif /* _DB_H_ */
| /*
* db.h
*
* Copyright (C) 2011 OpenTech Labs
* Andrew Clayton <[email protected]>
* Released under the GNU General Public License (GPL) version 3.
* See COPYING
*/
#ifndef _DB_H_
#define _DB_H_
/* For Tokyocabinet (user sessions) */
#include <tcutil.h>
#include <tctdb.h>
#include <stdbool.h>
#include <stdint.h>
#include <libgen.h>
/* MySQL */
/*
* The FCGI printf function seemed to be causing a conflict here, under F16
* with GCC 4.6.2
*
* Just undef printf for the my_global stuff and then define it back again.
*/
#undef printf
#include <my_global.h>
#define printf FCGI_printf
#include <mysql.h>
MYSQL *db_conn(void);
#endif /* _DB_H_ */
| Fix compiler warnings under F16/GCC 4.6.2 | Fix compiler warnings under F16/GCC 4.6.2
When compiling receiptomatic under Fedora 16 with GCC 4.6.2 we were
getting the following warnings...
gcc -Wall -std=c99 -O2 -g -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -fPIE -c receiptomatic-www.c
-D_RECEIPTOMATIC_WWW_ -I../../libctemplate `pkg-config --cflags
glib-2.0` `pkg-config --cflags gmime-2.0` `mysql_config --cflags`
In file included from /usr/include/mysql/my_global.h:1039:0,
from db.h:21,
from common.h:31,
from receiptomatic-www.c:22:
/usr/include/mysql/my_dbug.h:59:3: warning: ‘FCGI_printf’ is an
unrecognized format function type [-Wformat]
This seemed to be a conflict between the FCGI_printf definition and the
use of 'ATTRIBUTE_FORMAT(printf, 1, 2)' in my_global.h
The workaround seems to be to undef printf before including my_global.h
and then defining it back again afterwards.
Signed-off-by: Andrew Clayton <[email protected]>
| C | agpl-3.0 | ac000/receiptomatic |
7cad08e5c045a002e25c710ccb528f22e21ed835 | src/ffi.c | src/ffi.c | #include "mruby.h"
#include "mruby/value.h"
static mrb_value longsize(mrb_state *mrb, mrb_value self)
{
uint8_t size = (uint8_t)sizeof(long);
return mrb_fixnum_value(size);
}
/* ruby calls this to load the extension */
void mrb_mruby_rubyffi_compat_gem_init(mrb_state *mrb)
{
struct RClass *mod = mrb_define_module(mrb, "FFI");
mrb_define_class_method(mrb, mod, "longsize", longsize, ARGS_NONE());
}
void mrb_mruby_rubyffi_compat_gem_final(mrb_state *mrb)
{
}
| #include "mruby.h"
#include "mruby/value.h"
static mrb_value longsize(mrb_state *mrb, mrb_value self)
{
uint8_t size = (uint8_t)sizeof(long);
return mrb_fixnum_value(size);
}
/* ruby calls this to load the extension */
void mrb_mruby_rubyffi_compat_gem_init(mrb_state *mrb)
{
struct RClass *mod = mrb_define_module(mrb, "FFI");
mrb_define_class_method(mrb, mod, "longsize", longsize, MRB_ARGS_NONE());
}
void mrb_mruby_rubyffi_compat_gem_final(mrb_state *mrb)
{
}
| Fix for "implicit declaration of function 'ARGS_NONE' is invalid" error | Fix for "implicit declaration of function 'ARGS_NONE' is invalid" error
| C | mit | schmurfy/mruby-rubyffi-compat,schmurfy/mruby-rubyffi-compat,schmurfy/mruby-rubyffi-compat |
296ec37839f1504138b340d785fb9a1fd1fa03a9 | include/parrot/string_primitives.h | include/parrot/string_primitives.h | /* string_funcs.h
* Copyright (C) 2001-2003, The Perl Foundation.
* SVN Info
* $Id$
* Overview:
* This is the api header for the string subsystem
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#ifndef PARROT_STRING_PRIMITIVES_H_GUARD
#define PARROT_STRING_PRIMITIVES_H_GUARD
#ifdef PARROT_IN_CORE
/* Set the directory where ICU finds its data files (encodings,
locales, etc.) */
void string_set_data_directory(const char *dir);
/* Convert from any supported encoding, into our internal format */
void string_fill_from_buffer(Interp *interp,
const void *buffer, UINTVAL len, const char *encoding_name, STRING *s);
/* Utility method which knows how to uwind a single escape sequence */
typedef Parrot_UInt2 (*Parrot_unescape_cb)(Parrot_Int4 offset, void *context);
Parrot_UInt4
string_unescape_one(Interp *interp, UINTVAL *offset, STRING *string);
UINTVAL
Parrot_char_digit_value(Interp *interp, UINTVAL character);
#endif /* PARROT_IN_CORE */
#endif /* PARROT_STRING_PRIMITIVES_H_GUARD */
/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4:
*/
| /* string_funcs.h
* Copyright (C) 2001-2003, The Perl Foundation.
* SVN Info
* $Id$
* Overview:
* This is the api header for the string subsystem
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#ifndef PARROT_STRING_PRIMITIVES_H_GUARD
#define PARROT_STRING_PRIMITIVES_H_GUARD
#ifdef PARROT_IN_CORE
/* Set the directory where ICU finds its data files (encodings,
locales, etc.) */
PARROT_API void string_set_data_directory(const char *dir);
/* Convert from any supported encoding, into our internal format */
PARROT_API void string_fill_from_buffer(Interp *interp,
const void *buffer, UINTVAL len, const char *encoding_name, STRING *s);
/* Utility method which knows how to uwind a single escape sequence */
typedef Parrot_UInt2 (*Parrot_unescape_cb)(Parrot_Int4 offset, void *context);
PARROT_API Parrot_UInt4
string_unescape_one(Interp *interp, UINTVAL *offset, STRING *string);
PARROT_API UINTVAL
Parrot_char_digit_value(Interp *interp, UINTVAL character);
#endif /* PARROT_IN_CORE */
#endif /* PARROT_STRING_PRIMITIVES_H_GUARD */
/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4:
*/
| Fix the build on Win32 by making linkage of various symbols consistent again. | Fix the build on Win32 by making linkage of various symbols consistent again.
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@18778 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
| C | artistic-2.0 | fernandobrito/parrot,gitster/parrot,gagern/parrot,tkob/parrot,tewk/parrot-select,tewk/parrot-select,parrot/parrot,gagern/parrot,fernandobrito/parrot,gagern/parrot,youprofit/parrot,fernandobrito/parrot,fernandobrito/parrot,tewk/parrot-select,FROGGS/parrot,tkob/parrot,gitster/parrot,gagern/parrot,tkob/parrot,tewk/parrot-select,tkob/parrot,FROGGS/parrot,youprofit/parrot,gagern/parrot,youprofit/parrot,youprofit/parrot,parrot/parrot,tkob/parrot,FROGGS/parrot,gitster/parrot,parrot/parrot,FROGGS/parrot,tewk/parrot-select,FROGGS/parrot,tewk/parrot-select,fernandobrito/parrot,tkob/parrot,gitster/parrot,youprofit/parrot,FROGGS/parrot,tewk/parrot-select,youprofit/parrot,fernandobrito/parrot,parrot/parrot,tkob/parrot,gagern/parrot,gitster/parrot,FROGGS/parrot,gagern/parrot,parrot/parrot,FROGGS/parrot,gitster/parrot,youprofit/parrot,fernandobrito/parrot,tkob/parrot,gitster/parrot,youprofit/parrot |
0e9ab695770b9c5501b56fb712527e1ed780950d | cc1/tests/test038.c | cc1/tests/test038.c |
/*
name: TEST038
description: Basic test for tentative definitions
output:
*/
int x;
int x = 0;
int x;
int main();
void *
foo()
{
return &main;
}
int
main()
{
x = 0;
return x;
}
|
/*
name: TEST038
description: Basic test for tentative definitions
output:
test038.c:45: error: redeclaration of 'x'
G1 I x
(
#I0
)
F2 I E
X3 F2 main
F4 P E
G5 F4 foo
{
\
r X3 'P
}
G3 F2 main
{
\
G1 #I0 :I
r G1
}
*/
int x;
int x = 0;
int x;
int main();
void *
foo()
{
return &main;
}
int
main()
{
x = 0;
return x;
}
int x = 1;
| Add solution for test of tentative declarations | Add solution for test of tentative declarations
| C | isc | k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc |
d1327aec1bceaa7c998dd2eb47ab646f6c5db33d | vpx_ports/msvc.h | vpx_ports/msvc.h | /*
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VPX_PORTS_MSVC_H_
#define VPX_PORTS_MSVC_H_
#ifdef _MSC_VER
#include "./vpx_config.h"
# if _MSC_VER < 1900 // VS2015 provides snprintf
# define snprintf _snprintf
# endif // _MSC_VER < 1900
#if _MSC_VER < 1800 // VS2013 provides round
#include <math.h>
static INLINE double round(double x) {
if (x < 0)
return ceil(x - 0.5);
else
return floor(x + 0.5);
}
#endif // _MSC_VER < 1800
#endif // _MSC_VER
#endif // VPX_PORTS_MSVC_H_
| /*
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VPX_PORTS_MSVC_H_
#define VPX_PORTS_MSVC_H_
#ifdef _MSC_VER
#include "./vpx_config.h"
# if _MSC_VER < 1900 // VS2015 provides snprintf
# define snprintf _snprintf
# endif // _MSC_VER < 1900
#if _MSC_VER < 1800 // VS2013 provides round
#include <math.h>
static INLINE double round(double x) {
if (x < 0)
return ceil(x - 0.5);
else
return floor(x + 0.5);
}
static INLINE float roundf(float x) {
if (x < 0)
return (float)ceil(x - 0.5f);
else
return (float)floor(x + 0.5f);
}
static INLINE long lroundf(float x) {
if (x < 0)
return (long)(x - 0.5f);
else
return (long)(x + 0.5f);
}
#endif // _MSC_VER < 1800
#endif // _MSC_VER
#endif // VPX_PORTS_MSVC_H_
| Add roundf and lroundf replacements for VS < 2013. | Add roundf and lroundf replacements for VS < 2013.
Change-Id: I25678279ab44672acf680bf04d9c551156e2904b
| C | bsd-2-clause | GrokImageCompression/aom,mbebenita/aom,GrokImageCompression/aom,mbebenita/aom,mbebenita/aom,luctrudeau/aom,mbebenita/aom,GrokImageCompression/aom,luctrudeau/aom,GrokImageCompression/aom,luctrudeau/aom,luctrudeau/aom,GrokImageCompression/aom,mbebenita/aom,mbebenita/aom,GrokImageCompression/aom,smarter/aom,smarter/aom,mbebenita/aom,mbebenita/aom,smarter/aom,luctrudeau/aom,luctrudeau/aom,smarter/aom,smarter/aom,mbebenita/aom,smarter/aom |
667af78609aef7ce96f22c1727256265280919ae | board.h | board.h | #ifndef __BOARD_H
#define __BOARD_H
#include <aery32/all.h>
#define ADC_VREF 3.0
#define ADC_BITS 10
namespace board {
void init(void);
inline double cnv_to_volt(unsigned int cnv)
{
return cnv * (ADC_VREF / (1UL << ADC_BITS));
}
} /* end of namespace board */
#endif
| #ifndef __BOARD_H
#define __BOARD_H
#define ADC_VREF 3.0
#define ADC_BITS 10
namespace board {
void init(void);
inline double cnv_to_volt(unsigned int cnv)
{
return cnv * (ADC_VREF / (1UL << ADC_BITS));
}
} /* end of namespace board */
#endif
| Remove unnecessary include of aery32/all.h | Remove unnecessary include of aery32/all.h | C | bsd-3-clause | aery32/aery32,aery32/aery32,denravonska/aery32,denravonska/aery32 |
52b676ffd7f8665b01f37ebb515b9ba911561fc9 | zephyr/test/drivers/common/src/main.c | zephyr/test/drivers/common/src/main.c | /* Copyright 2021 The Chromium OS 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 <zephyr/zephyr.h>
#include <ztest.h>
#include "ec_app_main.h"
#include "test/drivers/test_state.h"
bool drivers_predicate_pre_main(const void *state)
{
return ((struct test_state *)state)->ec_app_main_run == false;
}
bool drivers_predicate_post_main(const void *state)
{
return !drivers_predicate_pre_main(state);
}
void test_main(void)
{
struct test_state state = {
.ec_app_main_run = false,
};
/* Run all the suites that depend on main not being called yet */
ztest_run_test_suites(&state);
ec_app_main();
state.ec_app_main_run = true;
/* Run all the suites that depend on main being called */
ztest_run_test_suites(&state);
/* Check that every suite ran */
ztest_verify_all_test_suites_ran();
}
| /* Copyright 2021 The Chromium OS 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 <zephyr/zephyr.h>
#include <ztest.h>
#include "ec_app_main.h"
#include "test/drivers/test_state.h"
bool drivers_predicate_pre_main(const void *state)
{
return ((struct test_state *)state)->ec_app_main_run == false;
}
bool drivers_predicate_post_main(const void *state)
{
return !drivers_predicate_pre_main(state);
}
void test_main(void)
{
struct test_state state = {
.ec_app_main_run = false,
};
/* Run all the suites that depend on main not being called yet */
ztest_run_all(&state);
ec_app_main();
state.ec_app_main_run = true;
/* Run all the suites that depend on main being called */
ztest_run_all(&state);
}
| Fix listing of test cases | zephyr: Fix listing of test cases
Use correct ZTEST API so test cases can be listed
BUG=b:240364238
BRANCH=NONE
TEST=./zephyr.exe -list
Signed-off-by: Al Semjonovs <[email protected]>
Change-Id: If3b603ab64421da558228e67a907039a1674ba0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3789128
Reviewed-by: Yuval Peress <[email protected]>
| C | bsd-3-clause | coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec |
17787f4779ab490398d7ff391230dbfedfa987c5 | sbin/md5/global.h | sbin/md5/global.h | /* GLOBAL.H - RSAREF types and constants
*/
/* PROTOTYPES should be set to one if and only if the compiler supports
function argument prototyping.
The following makes PROTOTYPES default to 0 if it has not already
been defined with C compiler flags.
*/
#ifndef PROTOTYPES
#define PROTOTYPES 0
#endif
/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;
/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;
/* UINT4 defines a four byte word */
typedef unsigned long int UINT4;
/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
returns an empty list.
*/
#if PROTOTYPES
#define PROTO_LIST(list) list
#else
#define PROTO_LIST(list) ()
#endif
| /* GLOBAL.H - RSAREF types and constants
*/
/* PROTOTYPES should be set to one if and only if the compiler supports
function argument prototyping.
The following makes PROTOTYPES default to 0 if it has not already
been defined with C compiler flags.
*/
#ifndef PROTOTYPES
#define PROTOTYPES 0
#endif
/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;
#if 0
/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;
/* UINT4 defines a four byte word */
typedef unsigned long int UINT4;
#else
#include <sys/types.h>
/* UINT2 defines a two byte word */
typedef u_int16_t UINT2;
/* UINT4 defines a four byte word */
typedef u_int32_t UINT4;
#endif /* 0 */
/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
returns an empty list.
*/
#if PROTOTYPES
#define PROTO_LIST(list) list
#else
#define PROTO_LIST(list) ()
#endif
| Fix bad assumptions about types. PR: 1649 Reviewed by: phk Submitted by: Jason Thorpe <[email protected]> | Fix bad assumptions about types.
PR: 1649
Reviewed by: phk
Submitted by: Jason Thorpe <[email protected]>
| 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 |
3f283a62a22d59028e96d39fdc35c6bd85c2129d | src/modules/conf_randr/e_mod_main.h | src/modules/conf_randr/e_mod_main.h | #ifndef E_MOD_MAIN_H
# define E_MOD_MAIN_H
# define LOGFNS 1
# ifdef LOGFNS
# include <stdio.h>
# define LOGFN(fl, ln, fn) printf("-CONF-RANDR: %25s: %5i - %s\n", fl, ln, fn);
# else
# define LOGFN(fl, ln, fn)
# endif
# ifndef ECORE_X_RANDR_1_2
# define ECORE_X_RANDR_1_2 ((1 << 16) | 2)
# endif
# ifndef ECORE_X_RANDR_1_3
# define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
# endif
# ifndef E_RANDR_12
# define E_RANDR_12 (e_randr_screen_info.rrvd_info.randr_info_12)
# endif
EAPI extern E_Module_Api e_modapi;
EAPI void *e_modapi_init(E_Module *m);
EAPI int e_modapi_shutdown(E_Module *m);
EAPI int e_modapi_save(E_Module *m);
extern const char *mod_dir;
/**
* @addtogroup Optional_Conf
* @{
*
* @defgroup Module_Conf_RandR RandR (Screen Resize, Rotate and Mirror)
*
* Configures size, rotation and mirroring of screen. Uses the X11
* RandR protocol (does not work with NVidia proprietary drivers).
*
* @}
*/
#endif
| #ifndef E_MOD_MAIN_H
# define E_MOD_MAIN_H
//# define LOGFNS 1
# ifdef LOGFNS
# include <stdio.h>
# define LOGFN(fl, ln, fn) printf("-CONF-RANDR: %25s: %5i - %s\n", fl, ln, fn);
# else
# define LOGFN(fl, ln, fn)
# endif
EAPI extern E_Module_Api e_modapi;
EAPI void *e_modapi_init(E_Module *m);
EAPI int e_modapi_shutdown(E_Module *m);
EAPI int e_modapi_save(E_Module *m);
/**
* @addtogroup Optional_Conf
* @{
*
* @defgroup Module_Conf_RandR RandR (Screen Resize, Rotate and Mirror)
*
* Configures size, rotation and mirroring of screen. Uses the X11
* RandR protocol (does not work with NVidia proprietary drivers).
*
* @}
*/
#endif
| Remove useless defines and variables. | Remove useless defines and variables.
Signed-off-by: Christopher Michael <[email protected]>
SVN revision: 84200
| C | bsd-2-clause | tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment |
821e790e9f14828382c787ca907ef4c7c86ff1de | src/handler/plparrot.c | src/handler/plparrot.c | #include "postgres.h"
#include "executor/spi.h"
#include "commands/trigger.h"
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
/*
Figure out how to include these properly
#include "parrot/embed.h"
#include "parrot/debugger.h"
#include "parrot/runcore_api.h"
*/
PG_MODULE_MAGIC;
Datum plparrot_call_handler(PG_FUNCTION_ARGS);
void plparrot_elog(int level, char *message);
PG_FUNCTION_INFO_V1(plparrot_call_handler);
Datum
plparrot_call_handler(PG_FUNCTION_ARGS)
{
Datum retval;
retval = PG_GETARG_DATUM(0);
PG_TRY();
{
}
PG_CATCH();
{
}
PG_END_TRY();
return retval;
}
void
plparrot_elog(int level, char *message)
{
elog(level, "%s", message);
}
| #include "postgres.h"
#include "executor/spi.h"
#include "commands/trigger.h"
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
#include "utils/builtins.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
/*
Figure out how to include these properly
We need to use "parrot_config includedir"
#include "parrot/embed.h"
#include "parrot/debugger.h"
#include "parrot/runcore_api.h"
*/
PG_MODULE_MAGIC;
int execq(text *sql, int cnt);
int
execq(text *sql, int cnt)
{
char *command;
int ret;
int proc;
SPI_connect();
SPI_finish();
//pfree(command);
return (proc);
}
Datum plparrot_call_handler(PG_FUNCTION_ARGS);
void plparrot_elog(int level, char *message);
PG_FUNCTION_INFO_V1(plparrot_call_handler);
Datum
plparrot_call_handler(PG_FUNCTION_ARGS)
{
Datum retval;
retval = PG_GETARG_DATUM(0);
PG_TRY();
{
}
PG_CATCH();
{
}
PG_END_TRY();
return retval;
}
void
plparrot_elog(int level, char *message)
{
elog(level, "%s", message);
}
| Add the beginnings of something that does SPI | Add the beginnings of something that does SPI
| C | artistic-2.0 | leto/plparrot,leto/plparrot,leto/plparrot |
2cba4cc585f7dde2b9b582d2ff3c164819697e3b | features/FEATURE_UVISOR/includes/uvisor/api/inc/uvisor_deprecation.h | features/FEATURE_UVISOR/includes/uvisor/api/inc/uvisor_deprecation.h | /*
* Copyright (c) 2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __UVISOR_DEPRECATION_H__
#define __UVISOR_DEPRECATION_H__
#if defined(UVISOR_PRESENT) && UVISOR_PRESENT == 1
#warning "Warning: You are using FEATURE_UVISOR, which is unsupported as of Mbed OS 5.9."
#endif
#endif // __UVISOR_DEPRECATION_H__
| /*
* Copyright (c) 2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __UVISOR_DEPRECATION_H__
#define __UVISOR_DEPRECATION_H__
#if defined(UVISOR_PRESENT) && UVISOR_PRESENT == 1
#warning "Warning: uVisor is superseded by the Secure Partition Manager (SPM) defined in the ARM Platform Security Architecture (PSA). \
uVisor is deprecated as of Mbed OS 5.9, and being replaced by a native PSA-compliant implementation of SPM."
#endif
#endif // __UVISOR_DEPRECATION_H__
| Edit warning about FEATURE_UVISOR being deprecated | Edit warning about FEATURE_UVISOR being deprecated
| C | apache-2.0 | mbedmicro/mbed,c1728p9/mbed-os,c1728p9/mbed-os,betzw/mbed-os,andcor02/mbed-os,andcor02/mbed-os,betzw/mbed-os,betzw/mbed-os,betzw/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,andcor02/mbed-os,andcor02/mbed-os,c1728p9/mbed-os,mbedmicro/mbed,c1728p9/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,kjbracey-arm/mbed,kjbracey-arm/mbed,betzw/mbed-os,mbedmicro/mbed,mbedmicro/mbed,betzw/mbed-os,mbedmicro/mbed,andcor02/mbed-os |
471c298771351869ac9b520468ae8e392665572e | src/idxgen.h | src/idxgen.h | #ifndef IDXGEN_H
#define IDXGEN_H
#include "encparams.h"
#include "bitstring.h"
typedef struct NtruIGFState {
int N;
int c;
int clen;
char *Z;
int zlen;
int rem_len;
NtruBitStr buf;
int counter;
void (*hash)(char[], int, char[]);
int hlen;
} NtruIGFState;
/**
* @brief IGF initialization
*
* Initializes the Index Generation Function.
* Based on IGF-2 from IEEE P1363.1 section 8.4.2.1.
*
* @param seed
* @param seed_len
* @param params
* @param s
*/
void ntru_IGF_init(char *seed, int seed_len, struct NtruEncParams *params, NtruIGFState *s);
/**
* @brief IGF next index
*
* Returns the next index.
* Based on IGF-2 from IEEE P1363.1 section 8.4.2.1.
*
* @param s
* @param i
*/
void ntru_IGF_next(NtruIGFState *s, int *i);
#endif /* IDXGEN_H */
| #ifndef IDXGEN_H
#define IDXGEN_H
#include "encparams.h"
#include "bitstring.h"
typedef struct NtruIGFState {
int N;
int c;
char *Z;
int zlen;
int rem_len;
NtruBitStr buf;
int counter;
void (*hash)(char[], int, char[]);
int hlen;
} NtruIGFState;
/**
* @brief IGF initialization
*
* Initializes the Index Generation Function.
* Based on IGF-2 from IEEE P1363.1 section 8.4.2.1.
*
* @param seed
* @param seed_len
* @param params
* @param s
*/
void ntru_IGF_init(char *seed, int seed_len, struct NtruEncParams *params, NtruIGFState *s);
/**
* @brief IGF next index
*
* Returns the next index.
* Based on IGF-2 from IEEE P1363.1 section 8.4.2.1.
*
* @param s
* @param i
*/
void ntru_IGF_next(NtruIGFState *s, int *i);
#endif /* IDXGEN_H */
| Remove an unused struct member | Remove an unused struct member
| C | bsd-3-clause | iblumenfeld/libntru,jl777/libntru,jquesnelle/libntru,jquesnelle/libntru,jl777/libntru,jl777/libntru,iblumenfeld/libntru,iblumenfeld/libntru,jquesnelle/libntru |
bf6a7f095f6721e4172c30acf69d67e2e51899ff | lib/GPIOlib.h | lib/GPIOlib.h | #include <wiringPi.h>
#include <softPwm.h>
#ifndef GPIOLIB_H
#define GPIOLIB_H
#define FORWARD 1
#define BACKWARD 0
namespace GPIO
{
int init();
int controlLeft(int direction,int speed);
int controlRight(int direction,int speed);
int stopLeft();
int stopRight();
int resetCounter();
void getCounter(int *countLeft,int *countRight);
int turnTo(int angle);
}
#endif
| Add header file for reference | Add header file for reference
| C | mit | miaoxw/EmbeddedSystemNJU2017-Demo |
|
14dd5b240b3b619889aef85184704448c1b05dba | src/skbuff.c | src/skbuff.c | #include "syshead.h"
#include "skbuff.h"
struct sk_buff *alloc_skb(unsigned int size)
{
struct sk_buff *skb = malloc(sizeof(struct sk_buff));
memset(skb, 0, sizeof(struct sk_buff));
skb->data = malloc(size);
memset(skb->data, 0, size);
skb->head = skb->data;
skb->tail = skb->data;
skb->end = skb->tail + size;
return skb;
}
void free_skb(struct sk_buff *skb)
{
free(skb->data);
free(skb);
}
void *skb_reserve(struct sk_buff *skb, unsigned int len)
{
skb->data += len;
skb->tail += len;
return skb->data;
}
uint8_t *skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data -= len;
skb->len += len;
return skb->data;
}
void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
{
skb->dst = dst;
}
uint8_t *skb_head(struct sk_buff *skb)
{
return skb->head;
}
| #include "syshead.h"
#include "skbuff.h"
struct sk_buff *alloc_skb(unsigned int size)
{
struct sk_buff *skb = malloc(sizeof(struct sk_buff));
memset(skb, 0, sizeof(struct sk_buff));
skb->data = malloc(size);
memset(skb->data, 0, size);
skb->head = skb->data;
skb->tail = skb->data;
skb->end = skb->tail + size;
return skb;
}
void free_skb(struct sk_buff *skb)
{
free(skb->head);
free(skb);
}
void *skb_reserve(struct sk_buff *skb, unsigned int len)
{
skb->data += len;
skb->tail += len;
return skb->data;
}
uint8_t *skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data -= len;
skb->len += len;
return skb->data;
}
void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
{
skb->dst = dst;
}
uint8_t *skb_head(struct sk_buff *skb)
{
return skb->head;
}
| Fix pointer in skb free routine | Fix pointer in skb free routine
You cannot pass a different memory location to malloc than what it was
originally allocated with :p
| C | mit | saminiir/level-ip,saminiir/level-ip |
5eb3562266c5f970ae0943da45dd7740aa7a5747 | src/sounds.h | src/sounds.h | /*****************************************************************************
* SOUNDS HEADER *
* Provides easy access to all sounds. *
* See: sdl_snake.c *
*****************************************************************************/
#pragma once
#ifdef _WIN32 // STUPID WINDOWS
#include "SDL_mixer.h"
#else
#include "SDL/SDL_mixer.h"
#endif
Mix_Chunk *snd_menu_blip;
Mix_Chunk *snd_menu_select;
Mix_Chunk *snd_crash;
Mix_Chunk *snd_eat;
Mix_Chunk *snd_321;
Mix_Chunk *snd_go; | /*****************************************************************************
* SOUNDS HEADER *
* Provides easy access to all sounds. *
* See: sdl_snake.c *
*****************************************************************************/
#pragma once
#if defined _WIN32 || defined __APPLE__
#include "SDL_mixer.h"
#else
#include "SDL/SDL_mixer.h"
#endif
Mix_Chunk *snd_menu_blip;
Mix_Chunk *snd_menu_select;
Mix_Chunk *snd_crash;
Mix_Chunk *snd_eat;
Mix_Chunk *snd_321;
Mix_Chunk *snd_go; | Fix compilation on Mac OS X | Fix compilation on Mac OS X
| C | mit | footballhead/sdl-snake,footballhead/sdl-snake,footballhead/sdl-snake |
3a437c4533474161b89955df829907427313cdd5 | test/suite/bugs/ifpp.c | test/suite/bugs/ifpp.c | int f(int d)
{
int i = 0, j, k, l;
if (d%2==0)
if (d%3==0)
i+=2;
else
i+=3;
if (d%2==0)
{
if (d%3==0)
i+=7;
}
else
i+=11;
l = d;
if (d%2==0)
while (l--)
if (1)
i+=13;
else
i+=17;
l = d;
if (d%2==0)
{
while (l--)
if (1)
i+=21;
}
else
i+=23;
if (d==0)
i+=27;
else if (d%2==0)
if (d%3==0)
i+=29;
else if (d%5==0)
if (d%7==0)
i+=31;
else
i+=33;
return i;
}
int main()
{
int i,k=0;
for(i=0;i<255;i++)
{
k+=f(i);
}
printf("Result: %d\n",k);
} | Add another test for pretty printing if-then-else | Add another test for pretty printing if-then-else | C | bsd-3-clause | vincenthz/language-c,vincenthz/language-c,vincenthz/language-c |
|
85d984179dc8cd7b3a365229e592811ee592af3a | str/env.h | str/env.h | #ifndef BGLIBS__STR__ENV__H__
#define BGLIBS__STR__ENV__H__
#include <str/str.h>
/** \defgroup envstr envstr: Environment variables in a str.
\par Calling Convention
All functions that allocate memory return \c 0 (false) if the function
failed due to being unable to allocate memory, and non-zero (true)
otherwise.
@{ */
extern const char* envstr_find(const str* env, const char* var, long varlen);
extern const char* envstr_get(const str* env, const char* var);
extern int envstr_set(str* env, const char* var, const char* val, int overwrite);
extern void envstr_unset(str* env, const char* var);
extern int envstr_put(str* env, const char* asgn, int overwrite);
extern int envstr_from_array(str* env, char** array, int overwrite);
extern int envstr_from_string(str* env, const char* s, int overwrite);
extern char** envstr_make_array(const str* env);
/* @} */
#endif
| #ifndef BGLIBS__STR__ENV__H__
#define BGLIBS__STR__ENV__H__
struct str;
/** \defgroup envstr envstr: Environment variables in a str.
\par Calling Convention
All functions that allocate memory return \c 0 (false) if the function
failed due to being unable to allocate memory, and non-zero (true)
otherwise.
@{ */
extern const char* envstr_find(const struct str* env, const char* var, long varlen);
extern const char* envstr_get(const struct str* env, const char* var);
extern int envstr_set(struct str* env, const char* var, const char* val, int overwrite);
extern void envstr_unset(struct str* env, const char* var);
extern int envstr_put(struct str* env, const char* asgn, int overwrite);
extern int envstr_from_array(struct str* env, char** array, int overwrite);
extern int envstr_from_string(struct str* env, const char* s, int overwrite);
extern char** envstr_make_array(const struct str* env);
/* @} */
#endif
| Use a forward struct str declaration to avoid recursive includes. | Use a forward struct str declaration to avoid recursive includes.
| C | lgpl-2.1 | bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs |
cb0a193312f6e50c487ff1b7efebb96ce46df8ef | src/module.h | src/module.h | #include "main.h"
enum Priority { PRI_HIGH, PRI_MEDIUM_HIGH, PRI_NORMAL, PRI_MEDIUM_LOW, PRI_LOW };
#define MODULE_SPAWN(modName) extern "C" Module* spawn(std::string moduleName, std::map<std::string, std::string> config, std::string workingDir, unsigned short debugLevel, Base* botptr) {\
return new modName (moduleName, config, workingDir, debugLevel, botptr);\
}
typedef bool MsgAction;
const bool MSG_CONTINUE = true;
const bool MSG_IGNORE = false;
class Module {
public:
Module(std::string modName, std::map<std::string, std::string> conf, std::string workDir, unsigned short debug, Base* botptr);
const Priority priority;
unsigned int apiVersion() = 0;
bool onLoadComplete();
void onRehash();
void onModuleLoad(std::string modName);
void onModuleUnload(std::string modName);
// TODO: module hooks
std::string description();
std::list<std::string> provides();
std::list<std::string> requires();
std::list<std::string> supports();
protected:
std::string moduleName;
std::map<std::string, std::string> config;
std::string workingDir;
unsigned short debugLevel;
private:
Base* bot;
}; | #include "main.h"
enum Priority { PRI_HIGH, PRI_MEDIUM_HIGH, PRI_NORMAL, PRI_MEDIUM_LOW, PRI_LOW };
#define MODULE_SPAWN(modName) extern "C" Module* spawn(std::string moduleName, std::map<std::string, std::string> config, std::string workingDir, unsigned short debugLevel, Base* botptr) {\
return new modName (moduleName, config, workingDir, debugLevel, botptr);\
}
typedef bool MsgAction;
const bool MSG_CONTINUE = true;
const bool MSG_IGNORE = false;
class Module {
public:
Module(std::string modName, std::map<std::string, std::string> conf, std::string workDir, unsigned short debug, Base* botptr);
const Priority priority;
virtual unsigned int apiVersion() = 0;
virtual bool onLoadComplete();
virtual void onRehash();
virtual void onModuleLoad(std::string modName);
virtual void onModuleUnload(std::string modName);
// TODO: module hooks
virtual std::string description();
virtual std::list<std::string> provides();
virtual std::list<std::string> requires();
virtual std::list<std::string> supports();
protected:
std::string moduleName;
std::map<std::string, std::string> config;
std::string workingDir;
unsigned short debugLevel;
private:
Base* bot;
}; | Make virtual functions that need to be virtual | Make virtual functions that need to be virtual
| C | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
866bade85dec9a231350201fb147f9381eee55c7 | tensorflow/core/platform/default/integral_types.h | tensorflow/core/platform/default/integral_types.h | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
#define TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
#include <cstdint>
// IWYU pragma: private, include "third_party/tensorflow/core/platform/types.h"
// IWYU pragma: friend third_party/tensorflow/core/platform/types.h
namespace tensorflow {
typedef signed char int8;
typedef short int16;
typedef int int32;
[[deprecated("Use int64_t instead.")]] typedef ::std::int64_t int64;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef std::uint64_t uint64;
} // namespace tensorflow
#endif // TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
| /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
#define TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
#include <cstdint>
// IWYU pragma: private, include "third_party/tensorflow/core/platform/types.h"
// IWYU pragma: friend third_party/tensorflow/core/platform/types.h
namespace tensorflow {
typedef signed char int8;
typedef short int16;
typedef int int32;
typedef ::std::int64_t int64;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef std::uint64_t uint64;
} // namespace tensorflow
#endif // TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
| Remove deprecation on int64 type. | Remove deprecation on int64 type.
I have half a million lines of log-spew in my CI from this and clearly there has been ~no effort in the codebase to actually stop using it. Please do not deprecate such a critical type until at least its own codebase has substantially migrated off of it.
PiperOrigin-RevId: 399093429
Change-Id: I807d9e6c79c4c33f4a50f88ba28fe5fda194ddd4
| C | apache-2.0 | tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,karllessard/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,karllessard/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,Intel-Corporation/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow |
16514de50a7936950845a3851cae8ce571e0c2c2 | include/llvm/Transforms/Utils/IntegerDivision.h | include/llvm/Transforms/Utils/IntegerDivision.h | //===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains an implementation of 32bit integer division for targets
// that don't have native support. It's largely derived from compiler-rt's
// implementation of __udivsi3, but hand-tuned for targets that prefer less
// control flow.
//
//===----------------------------------------------------------------------===//
#ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H
#define TRANSFORMS_UTILS_INTEGERDIVISION_H
namespace llvm {
class BinaryOperator;
}
namespace llvm {
bool expandDivision(BinaryOperator* Div);
} // End llvm namespace
#endif
| //===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains an implementation of 32bit integer division for targets
// that don't have native support. It's largely derived from compiler-rt's
// implementation of __udivsi3, but hand-tuned for targets that prefer less
// control flow.
//
//===----------------------------------------------------------------------===//
#ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H
#define TRANSFORMS_UTILS_INTEGERDIVISION_H
namespace llvm {
class BinaryOperator;
}
namespace llvm {
/// Generate code to divide two integers, replacing Div with the generated
/// code. This currently generates code similarly to compiler-rt's
/// implementations, but future work includes generating more specialized code
/// when more information about the operands are known. Currently only
/// implements 32bit scalar division, but future work is removing this
/// limitation.
///
/// @brief Replace Div with generated code.
bool expandDivision(BinaryOperator* Div);
} // End llvm namespace
#endif
| Document the interface for integer expansion, using doxygen-style comments | Document the interface for integer expansion, using doxygen-style comments
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@164231 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.