text stringlengths 3.08k 10.5k |
|---|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "papi.h"
#include "eventstock.h"
#if !defined(_PAPI_CPU_COMPONENT_NAME)
#define _PAPI_CPU_COMPONENT_NAME "perf_event"
#endif
int build_stock(evstock* stock)
{
int ret;
PAPI_event_info_t info;
int cid;
int ncomps =... |
/* Copyright (C) 2016 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publi... |
#include <linux/limits.h>
#include <ncurses.h> // COLOR_ constants
#include <notcurses/notcurses.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "cvector.h"
#include "hashtab.h"
#include "log.h"
#include "util.h"
#include "notify.h"
Co... |
/*
* Copyright 2017, <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distri... |
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... |
/* $OpenBSD: wdc_obio.c,v 1.4 2011/05/09 22:33:53 matthew Exp $ */
/* $NetBSD: wdc_obio.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME> and by <NAME>.
... |
#include "BugCheck.h"
#include "FatalScene.h"
#include <revolution.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <egg/core/eggSystem.h>
static inline void Util_toUtf16(wchar_t *dst, u32 dst_max, const char *src, u32 src_max) {
const u32 min_bound = MIN(dst_max, src_max);
const u32 le... |
/*
* Copyright (c) 2016 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, di... |
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include "btree.h"
struct mark_occurences {
uint32_t *keys;
int *occurences;
int count;
};
bool occurence_callback(const void *key, void *value, void *params){
stru... |
/*
* Copyright 2017-2020 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/* Standard C Included Files */
#include <string.h>
/* SDK Included Files */
#include "Driver_ETH_MAC.h"
#include "pin_mux.h"
#include "board.h"
#include "fsl_debug_console.h"
#include "fsl_enet.h"
#include "fsl_ene... |
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
*
* OBEX Server
*
* Copyright (C) 2007-2010 <NAME> <<EMAIL>>
*
*
*/
#define EOL "\r\n"
#define VCARD_LISTING_BEGIN \
"<?xml version=\"1.0\"?>" EOL\
"<!DOCTYPE vcard-listing SYSTEM \"vcard-listing.dtd\">" EOL\
"<vCard-listing version=\"1.0\">" EOL
#define ... |
/******************************************************************************
*
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Softw... |
#include <stdlib.h>
#include "minipack.h"
#include "qip_cursor.h"
#include "sky_qip_module.h"
#include "dbg.h"
//==============================================================================
//
// Functions
//
//==============================================================================
//----------------------... |
/***************************************************************************
Atari Rampart hardware
****************************************************************************/
#include "driver.h"
#include "machine/atarigen.h"
#include "vidhrdw/generic.h"
#include "rampart.h"
/*********************... |
#include "g_local.h"
float Lerp(float value1, float value2, float amount)
{
float delta = value2 - value1;
return value1 + amount * delta;
}
int civwalk_SetPathData(edict_t *self)
{
vec3_t v;
vec3_t facingVec;
VectorSubtract (self->s.origin, self->target_ent->s.origin, v);
self->mov... |
#include <stdio.h>
#include <linux/elf.h>
#include <string.h>
#include <malloc.h>
#include "section_table.h"
#include "program_table.h"
/* 文件大小 */
int sizeoffile(FILE *f)
{
unsigned int o = ftell(f);
fseek(f,0,SEEK_END);
int s = ftell(f);
fseek(f,o,SEEK_SET);
return s;
}
void Ehdr64(Elf64_Ehdr eh... |
struct vector {
Float x, y, z;
};
struct int_vector {
long int x, y, z;
};
Float D2(struct vector, struct vector); /* calculates the square of the distance */
void Zero(struct vector *);
void MakeVector(struct vector, struct vector, struct vector *);
Float Dot(struct vector, struct vector);
Float Norm(struct v... |
/**
* \author <NAME> - <EMAIL>
* \file
* \brief Файл, в котором реализованы тела функций из файла \b "win_menu.h". \endb
*/
#include "win_menu.h"
#include "rectangle.h"
#include "game.h"
#include "color.h"
#include "str.h"
#include "constants.h"
#include "error.h"
#include <stdio.h>
#include <stdlib.h>
#ifndef DO... |
/*
* Copyright 2018 NXP
* All rights reserved.
*
* THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED 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 NXP OR ITS CONTRIBUTORS BE LIA... |
/*
* main.c
*
* Created on: 2018/08/11
* Author: s.tochiyama
*/
/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
/* Standard demo includes. */
#include "partest.h"
#include "TimerDemo.h"
#include "QueueOverwrite.h"
#include "EventGroupsDemo.h"
#include "r_smc_entry... |
//
// kfc_thread.c
// kfc_thread
//
// Created by 徐仲平 on 2019/3/6.
// Copyright © 2019 徐仲平. All rights reserved.
//
#include "kfc_thread_core.h"
#include <assert.h>
#include "kfc_switch.h"
#include "kfc_driver.h"
#include <stdlib.h>
#include <string.h>
#pragma mark - declaration
#define KFC_PAGE_SIZE 4096
#defi... |
//#include <float.h>
//#include <math.h>
#define MIN(a, b) ( (a < b) ? a : b)
#define MAX(a, b) ( (a > b) ? a : b)
typedef double real8 ;
void StressCheckEpsFail(real8* newSxx, real8* newSyy, real8* newSzz,
real8* newTxy, real8* newTxz, real8* newTyz,
real8* eps, ... |
#include <stdio.h>
#include <ctype.h>
#include <stdbool.h>
double triangle_area(double base, double height);
int check(int x, int y, int n);
int gcd(int m, int n);
int day_of_year(int month, int day, int year);
int digit(int n, int k);
int f(int a, int b);
int largest(int a[], int n);
int average(int a[], int n);
int... |
/*
* Copyright (c) 2016 Intel Corporation
*
* 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 ... |
/*-------------------------------------------------------------------------
*
* polar_monitor_proxy.c
* views of polardb proxy
*
* Copyright (c) 2021, Alibaba Group Holding Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Li... |
/* Test file for mpz_set_fr / mpfr_get_z.
Copyright 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
Contributed by the AriC and Caramel projects, INRIA.
This file is part of the GNU MPFR Library.
The GNU MPFR Library is free software; you can redistribute it and/or modify
it under... |
#include <stdio.h>
#include <stdlib.h>
// Fahrenheit to Celsius function
void FtoC(){
int userInFtemp;
int fahrenheitToCelsius;
printf("\tPlease enter the Fahrenheit degree: ");
scanf("\t%d", &userInFtemp);
fahrenheitToCelsius = ((userInFtemp-32) * (5.0/9.0));
printf("\n\Celsius: %d\n", fahren... |
/* $OpenBSD: cu.c,v 1.37 2010/07/03 03:33:12 nicm Exp $ */
/* $NetBSD: cu.c,v 1.5 1997/02/11 09:24:05 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted... |
#include "spline.h"
bool spline_cons (spline *_spline) {
dlog_debug (_, "spline_cons");
_spline->min_t = FLT_MAX;
_spline->max_t = FLT_MIN;
_spline->_segs = malloc(sizeof(blaze));
if (! blaze_cons (_spline->_segs))
return false;
return true;
}
bool spline_decons (spline *_spline... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "types.h"
#include "display.h"
#include "env.h"
#include "exec.h"
#include "insts.h"
#include "memory.h"
#include "parser.h"
#include "primitives.h"
#include "safestd.h"
#include "string.h"
/* -- input_mode
* Possible values and corresponding comman... |
#include "mpd.h"
extern struct portentry porttable[MAXFDENTRIES];
extern int myrank;
extern int console_idx;
extern int debug;
int setup_network_socket( int *port ) /* returns fd */
{
int backlog = 15;
int rc;
mpd_sockopt_len_t sinlen;
int skt_fd;
struct sockaddr_in s_in;
s_in.sin_f... |
/*
*
* This file is part of the ALPBench Benchmark Suite Version 1.0
*
* Copyright (c) 2005 The Board of Trustees of the University of Illinois
*
* All rights reserved.
*
* ALPBench is a derivative of several codes, and restricted by licenses
* for those codes, as indicated in the source files and the ALPB... |
/*
* Linux driver attachment glue for aic7770 based controllers.
*
* Copyright (c) 2000-2001 Adaptec Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source ... |
#include "axis.h"
#include <utils/drawable.h>
#include "model.h"
#include "node.h"
#include "spatial.h"
#include "light.h"
#include <utils/nk.h>
#include <utils/shader.h>
#include <systems/editmode.h>
#include <systems/window.h>
#include <candle.h>
#define SCALE 0.25f
static mesh_t *g_rot_axis_mesh = NULL;
static voi... |
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include <sys/mman.h>
#include <time.h>
#define SERV_PORT 4000 // port
#define LISTENQ 10 // maximum number of client connection... |
/*
* authreadkeys.c - routines to support the reading of the key file
*/
#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include "ntp.h"
#include "ntp_syslog.h"
#include "ntp_stdlib.h"
#include "lib_strbuf.h"
#include <openssl/objects.h>
#include <openssl/evp.h>
/* Forwards */
static char *nexttok (char... |
#include <stdio.h>
struct Interval {
int nums[3];
struct Interval *next;
};
enum interval {start, finish, value};
// preprocessing
struct Interval *ReadIntervals(FILE *fp);
struct Interval *ListInsert(int nums[3], struct Interval *old_list);
void PrintList(struct Interval *h);
int GetListSize(struct Interval *list... |
/*
* systest.h
*
* System Tests:
* - Memory
* - Keyboard
* - Floppy Drive
* - Joystick / Mouse
* - Audio
* - Video
*
* Written & released by <NAME> <<EMAIL>>
*
* This is free and unencumbered software released into the public domain.
* See the file COPYING for more details, or visit <http://unlic... |
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "8ccc.h"
#define BUFLEN 256
static Token *ungotten = NULL;
static Token *make_ident(String *s)
{
Token *r = malloc(sizeof(Token));
r->type = TTYPE_IDENT;
r->sval = get_cstring(s);
return r;
}
static Token *make_strtok(String *s)
{
... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define NATOMS 120
#define BSIZE 1024
/*************************************************************************************************************************/
typedef enum
{
FALSE = 0,
TRUE = 1
} MyBoolean;
/*******************************************... |
/**
* @file MAX31855K.c
* @author <NAME>
* @brief MAX31855K SparkFun Breakout Board API.
* @version 0.1
* @date 2021-07-07
*
* @note API inspired by SparkFun's MAX31855K Arduino library.
*
* MAX31855K Memory Map:
* D[31:18] Signed 14-bit cold-junction compensated thermocouple temperature (HJ temperature)
... |
//Port for TMM2.Net communication
#define TPM2_NET_PORT 65506
//Header Bytes
#define TPM2_SER_BLOCK_START_BYTE 0xC9 // 'NEW BLOCK BYTE' for TPM2.Serial
#define TPM2_NET_BLOCK_START_BYTE 0x9C // 'NEW BLOCK BYTE' for TPM2.Net
#define TPM2_BLOCK_TYPE_DATA 0xDA // Block is a 'DATA BLOCK'
#define TPM2_BLOCK_TYPE... |
/*-
* Copyright (c) 2005-2010 <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list ... |
/*
* finite state machine implementation
*
* Author <NAME> <<EMAIL>>
*
* Thanks to <NAME>
* <NAME>
* Copyright 2008 by <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* publish... |
/* $OpenBSD: softintr.c,v 1.3 2010/12/21 14:56:24 claudio Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
* All rights reserved.
*
* Written by <NAME> for Wasabi Systems, Inc.
*
* Redistribution and use in source and binary forms, with or with... |
/*
* tests.c
* KVAT - Key Value Address Table
*
* Development and testing playground for KVAT.
* Inspired by blinky.c included in the TivaWare Blinky example project.
*
* Author: repixen
* Copyright (c) 2020-2021, repixen. All rights reserved.
*/
#include <kvat/kvat.h>
#include <stdbool.h>
#inclu... |
/*
* Copyright (c) 2019 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, pu... |
/**
* Copyright 2020 The Magma Authors.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
... |
/*
* Server-side snapshots
*
* Copyright (C) 1999 <NAME>
*
* 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 versi... |
/*
* Copyright (c) 2018, <NAME>, School of Mathematics and Statistics, YNU
* Apache License.
*
* 文件名称:Matrix_Operation.h
* 文件标识:
* 摘 要:接受一个由一维字符串数组与行列数目所解释的矩阵,可以对该矩阵进行行变换
*
* 当前版本:1.0
* 作 者:刘鹏
* 完成日期:2018年5月3日
*
* 预期版本:可以加入矩阵求逆等新的方法
*/
#pragma once
#include "Dynamic_Array.h"
// The INDEX begin with 1 rather 0 is re... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include <stdlib.h>
#ifdef _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include "azure_c_shared_utility/gballoc.h"
#include <time.h>
#include <stddef.h>
#include "az... |
/*
* Copyright (c) 2017-2020 The Khronos Group 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 applicab... |
/*
* BSD LICENSE
*
* Copyright(c) 2019-2021 Intel Corporation. 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
* ... |
/*
* Copyright (c) 2009, 2010, 2013, 2015 Nicira, 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 appl... |
/*
* Copyright (c) 2018-2019, WIOsense GmbH & Co. KG
* All rights reserved.
*
* This file is subject to the terms and conditions defined in the
* software license agreement which is part of this source code package.
*
*/
/**
* \file skg_service.c
* \brief Zephyr SKG Service implementation.
*/
#i... |
//
// Book: OpenGL(R) ES 2.0 Programming Guide
// Authors: <NAME>, <NAME>, <NAME>
// ISBN-10: 0321502795
// ISBN-13: 9780321502797
// Publisher: Addison-Wesley Professional
// URLs: http://safari.informit.com/9780321563835
// http://www.opengles-book.com
// Additional contributions co... |
/*
* webspy.c
*
* Sniff a user's web session, follow it real-time in our browser.
*
* Copyright (c) 1999 <NAME> <<EMAIL>>
*
* $Id: webspy.c,v 1.28 2001/03/15 08:33:05 dugsong Exp $
*/
#include "config.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ne... |
#include <stdio.h>
#include <string.h>
#include "espressif/esp_common.h"
#include "esp/uart.h"
#include "FreeRTOS.h"
#include "task.h"
#include "esp8266.h"
#include "app_config.h"
#include "ota-tftp.h"
#include "rboot-api.h"
#include "midea-ir.h"
#include "httpd.h"
#include <paho_mqtt_c/MQTTESP8266.h>
#include <pah... |
/* =========================================================================
future -
The MIT License (MIT)
Copyright (c) 2016 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in ... |
/*******************************************************************************/
// Copyright 2017-2018 <NAME>, <NAME>. All rights reserved.
// Use of this source code is governed by a MIT license that can be found in the
// LICENSE file.
/*******************************************************************************... |
/*
* Copyright (c) 2001 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, dis... |
/*
* Tencent is pleased to support the open source community by making IoT Hub available.
* Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the L... |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Lic... |
/*
* Copyright (c) 2012-2013 Etnaviv Project
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge... |
/* $Xorg: file.c,v 1.5 2001/02/09 02:05:40 xorgcvs Exp $ */
/*
Copyright 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
... |
/*++
/* NAME
/* postconf_main 3
/* SUMMARY
/* basic support for main.cf
/* SYNOPSIS
/* #include <postconf.h>
/*
/* void pcf_read_parameters()
/*
/* void pcf_show_parameters(fp, mode, param_class, names)
/* VSTREAM *fp;
/* int mode;
/* int param_class;
/* char **names;
/* DESCRIPTION
/* pcf_read_parameters() reads param... |
#include <errno.h>
#include <fcntl.h>
#include <linux/fs.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <unistd.h>
#include "runtime.h"
#define test_assert(expr) do { \
if (!(expr)) { \
printf("Error: %s -- failed at %s:%d\n", #expr, __FILE__, __LINE__); ... |
/* $Id: spinlock-r0drv-freebsd.c 57358 2015-08-14 15:16:38Z vboxsync $ */
/** @file
* IPRT - Spinlocks, Ring-0 Driver, FreeBSD.
*/
/*
* Copyright (c) 2007 <NAME>. osmundsen <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
... |
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <kernaux/assert.h>
#include <kernaux/pfa.h>
#include "libc.h"
#define PAGE_INDEX(page_addr) ((page_addr) / KERNAUX_PFA_PAGE_SIZE)
#define FLAG_INDEX_FROM_INDEX(page_index) ((page_index) / 8)
#define FLAG_MASK_FROM_INDEX(page_index) (1 << ((page_index) % 8))
... |
/* Memory leak monitor
*
* Copyright (C) 2015 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "... |
/*
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
*
* $COPYRIGHT$
*
* Additional copyrights may follow
*/
#include "opal_config.h"
#include "opal/constants.h"
#include "opal/dss/dss.h"
#include "opal/mca/hwloc/base/base.h"
int opal_hwloc_pack(opal_buffer_t *buffer, const void *src,
... |
/* $NetBSD: t_union.c,v 1.8 2011/08/07 06:01:51 hannken Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
#include <atf-c.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <rump/rump.h>
#include <rump/rump_syscalls.h... |
// 10 june 2017
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include "../../ui.h"
// TODO the grid simply flat out does not work on OS X
uiWindow *mainwin;
uiFontButton *fontButton;
uiEntry *textEntry;
uiCheckbox *nullFeatures;
uiArea *area;
uiAttributedString *attrstr = NULL;
stati... |
/*
* $Id: pam_auth.c,v 1.2.2.1 1999/12/22 20:28:40 wessels Exp $
*
* PAM authenticator module for Squid.
* Copyright (C) 1999 <NAME> <<EMAIL>>
*
* 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 Fo... |
/**
******************************************************************************
* @file : RTC.c
* @brief : This file provides code for the configuration
* of the RTC instances.
******************************************************************************
* @at... |
/*Base register adddress header file*/
#include "stm32l1xx.h"
/*Library related header files*/
#include "stm32l1xx_ll_gpio.h"
#include "stm32l1xx_ll_pwr.h"
#include "stm32l1xx_ll_rcc.h"
#include "stm32l1xx_ll_bus.h"
#include "stm32l1xx_ll_utils.h"
#include "stm32l1xx_ll_system.h"
#include "stm32l1xx_ll_tim.h"
#include ... |
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/lice... |
#include <stdint.h>
#include <console.h>
#include <numtostr.h>
#include <color.h>
#define COLS 80
#define ROWS 25
static uint8_t* screen = (uint8_t*)0xB8000;
static uint32_t cursorPos = 2; //Si lo coloco en 0 gcc coloca la variable en la sección .bss (que no me sirve)
static char buffer[64];
//Inicializo lo necesari... |
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
float* data;
float pi = 3.14159265358979323846;
float pi2 = 6.28318530717958647692;
#define REAL 0
#define IMAG 1
//data[point][real or imag]
//returns answer in data[]
void cmult(float* data, float* data2, float* output){
output[REAL] = (data[REAL] * data... |
/*
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
*/
#pragma once
/*
This module provides functionality to make it easy to implement state machines.
The main principle is that you define a static state transition table. You pass
that table into sm_create() and ge... |
// Timer0APWM.c
// Runs on LM4F120/TM4C123
// Use Timer0A in PWM mode to generate a square wave of a given
// period and duty cycle. Timer0A can use PF0 or PB6. PB6 is
// used because PF0 is connected to SW2 on the Launchpad.
// NOTE:
// By default PB6 is connected to PD0 by a zero ohm R9, and PB7
// is connec... |
#include "BluetoothA2DPSink32.h"
#include "BluetoothSerial.h"
BluetoothA2DPSink32 a2dp_sink; // Subclass of BluetoothA2DPSink
void avrc_metadata_callback(uint8_t id, const uint8_t *text) {
Serial.printf("==> AVRC metadata rsp: attribute id 0x%x, %s\n", id, text);
char msg[60];
int len = snprintf(msg, sizeof(msg... |
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <libentstream.h>
// Output buffer
uint8_t outBuf[BUFLEN];
// Errors are sent to stderr.
// We return false for convenience.
bool printError(char *message) {
fprintf(stderr, "%s\n", message);
return false;
}
bool initInfn... |
/*
* Copyright (c) 2005 <NAME>
* Copyright (c) 2006 <NAME>
* 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
* noti... |
/*!
Some example code snipet I find online and used in this.
epoll:
https://kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/
pthread:
http://timmurphy.org/2010/05/04/pthreads-in-c-a-minimal-working-example/
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/... |
/**
* \file
* \authors [<NAME>](https://github.com/kvedala)
* \brief Solve a multivariable first order [ordinary differential equation
* (ODEs)](https://en.wikipedia.org/wiki/Ordinary_differential_equation) using
* [midpoint Euler
* method](https://en.wikipedia.org/wiki/Midpoint_method)
*
* \details
* The ODE ... |
#include <stdlib.h>
#include "video/tcache.h"
#include "utils/allocator.h"
#include "utils/hashmap.h"
#include "utils/log.h"
#define CACHE_LIFETIME 300
typedef struct tcache_entry_key_t {
surface *c_surface;
char *c_remap_table;
uint16_t w,h;
uint8_t c_pal_offset;
} tcache_entry_key;
typedef struct t... |
/*
* IMS Open Corpus Workbench (CWB)
* Copyright (C) 1993-2006 by IMS, University of Stuttgart
* Copyright (C) 2007- by the respective contributers (see file AUTHORS)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as publi... |
// SPDX-License-Identifier: GPL-2.0
/*
* RTC interface for Wilco Embedded Controller with R/W abilities
*
* Copyright 2018 Google LLC
*
* The corresponding platform device is typically registered in
* drivers/platform/chrome/wilco_ec/core.c
*/
#include <linux/bcd.h>
#include <linux/err.h>
#include <linux/kernel... |
/***********************************************************************
* Copyright 2020, by the California Institute of Technology.
* ALL RIGHTS RESERVED. United States Government Sponsorship acknowledged.
* Any commercial use must be negotiated with the Office of Technology
* Transfer at the California Institute... |
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
* Copyright (c) 2018 Mellanox Technologies. All rights reserved.
*/
#include <linux/mlx5/vport.h>
#include "ib_rep.h"
#include "srq.h"
static int
mlx5_ib_set_vport_rep(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
{
struct mlx5_ib_dev *ibdev;
int v... |
/*
-------------------------------------------------------------------------------
One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
-------------------------------------------------------------------------------
*/
#define LITTLEENDIAN
/*
---------------------------------------------------------------... |
/*
* Name: <NAME>
* Date: 12 November 2020
* Part: 3
*
* Notes:
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <sys/wait.h>
#include <signal.h>
// globals
pid_t *pids; // for use by various funcs
int num_lines = 0; // equiv to num proces... |
/* Use of this source code is governed by the Apache 2.0 license; see COPYING. */
/* virtio.h - Virtual I/O device support in Linux/KVM style */
enum { VIO_VRING_SIZE = 512 };
// Based on the specification:
// virtio: Towards a De-Facto Standard For Virtual I/O Devices (<NAME>)
// http://ozlabs.org/~rusty/virtio... |
#include "../include/gc_bitmap.h"
#include <stdio.h>
static uintptr_t _free_list;
static uintptr_t _root_start;
static uintptr_t _root_end;
// static gc_hplst_t *_gc_heaps;
static gc_heap_t *_gc_heap;
static mark_ctx_t mark_ctx;
#define PTR_HEAP_OFF(p) ((uintptr_t)(p)-_gc_heap->base)
static inline void bitmap_set_a... |
/*-
* Copyright (c) 2015 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
#include <stdio.h>
#include <getopt.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <signal.h>
#include <pcap/pcap.h>
#include <get_num.h>
#include <help_ip.h>
struct option long_option[] =
{{"net_interface", required_argument, NULL, 'i'},
{"dst_ip", required_argu... |
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> ... |
// Copyright (c) <NAME>, 2018-2019
// All rights reserved
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "main.h"
#include "acc_definitions.h"
#include "acc_hal_definitions.h"
#include "acc_hal_integration.h"
/* spi handle */
extern SPI_HandleTypeDef A111_SPI_HANDLE;
/**
... |
/*
htop - IncSet.c
(C) 2005-2012 <NAME>
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#include "IncSet.h"
#include "StringUtils.h"
#include "Panel.h"
#include "ListItem.h"
#include "CRT.h"
#include <string.h>
#include <stdlib.h>
/*{
#include "FunctionBar.h"
#includ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.