text stringlengths 3.12k 18.7k |
|---|
#include <pcap.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdint.h>
// HWaddr 78:2B:CB:11:1B:DA
// TODO type
//
uint8_t macaddr[6];
uint32... |
#define BLACK_F407VE
#define MICROPY_HW_BOARD_NAME "BLACK STM32F407VE"
#define MICROPY_HW_MCU_NAME "STM32F407VE"
#define MICROPY_HW_HAS_SWITCH (1) // has 2 buttons KEY0=PE4, KEY1=PE3
#define MICROPY_HW_HAS_FLASH (1)
#define MICROPY_HW_HAS_SDCARD (1) // it has a sd scard, but i am no... |
/**
* @file
*
* This file contains the implementation of the Spinner specific BSP functions for STM32F072 Discovery.
*/
#include <math.h> // For fabsf()
#include <libopencm3/cm3/assert.h> // For the cm3_assert macros.
#include <libopencm3/stm32/gpio.h> // For the GPIO manipulation functions.
#include <libopencm3/... |
/*
* Copyright (C) 2016 BlueKitchen GmbH
*
* 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 follo... |
/* ****************************************************************************
*
* ESP32 platform interface for DHT temperature & humidity sensors
*
* Copyright (c) 2017, <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files... |
/*
* Copyright (c) 2012 by <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 of... |
/* $OpenBSD: mpls.h,v 1.25 2010/09/08 08:00:56 claudio Exp $ */
/*
* Copyright (C) 1999, 2000 and 2001 AYAME Project, WIDE Project.
* 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... |
/*******************************************************************************
main.c - description
-------------------
begin : 28.02.2017
copyright : (C) 2017 by MHS-Elektronik GmbH & Co. KG, Germany
... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2009-2010 iWave Systems
*
* 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; version 2 of the License.
*
* This program is... |
/*
Copyright (C) 2020 Derry <<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, publish, distribute,... |
/******************************************************************************/
/* LEDScroller.c */
/* Author: <NAME> */
/* Created: */... |
/* psi.c
*
* Psi (digamma) function
*
*
* SYNOPSIS:
*
* double x, y, psi();
*
* y = psi( x );
*
*
* DESCRIPTION:
*
* d -
* psi(x) = -- ln | (x)
* dx
*
* is the logarithmic derivative of the gamma function.
* Fo... |
/*
* "git push"
*/
#include "cache.h"
#include "refs.h"
#include "run-command.h"
#include "builtin.h"
#include "remote.h"
#include "transport.h"
#include "parse-options.h"
static const char * const push_usage[] = {
"git push [<options>] [<repository> [<refspec>...]]",
NULL,
};
static int thin;
static int deletere... |
#include <stdio.h>
/* Copyright 2021 <NAME> */
#define ERROR_NUM 0.0
float arithmetize(const float num1, const char op, const float num2)
{
if (op == '+')
{
return num1 + num2;
}
else if (op == '-')
{
return num1 - num2;
}
else if (op == '*')
{
return num1 * nu... |
/* Copyright 2020 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.
*/
/* STM32GX UCPD module for Chrome EC */
#include "clock.h"
#include "common.h"
#include "gpio.h"
#include "hooks.h"
#include "registers.h"
#includ... |
/*
* Copyright 2012 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, d... |
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/timerfd.h>
#include <getopt.h>
#include <poll.h>
#include <pipewire/pipewire.h>
#include <spa/utils/result.h>
#include <unistd.h>
#include "xdpw.h"
#include "logger.h"
enum event_loop_fd {
EVENT_LOOP_DBUS,
EVENT_LOOP_WAYLAND,
EVENT_LOOP_PIPEWI... |
/*
* tdd.c Copyright (C) 1999 Asle / ReDoX
*
* Converts TDD packed MODs back to PTK MODs
*
* Modified in 2006,2007,2014 by <NAME>
*/
#include <string.h>
#include <stdlib.h>
#include "prowiz.h"
static int depack_tdd(HIO_HANDLE *in, FILE *out)
{
uint8 tmp[1024];
uint8 pat[1024];
uint8 pmax;
int i, j, k;
i... |
/*
* vr_dpdk_netlink.c -- message handling from agent
*
* Copyright (c) 2014, Juniper Networks Private Inc.,
* All rights reserved
*/
#include <stdint.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <linux/genetlink.h>
#include <rte_errno.h>
#include "nl_util.h"
#include "vr_dpdk.h"
#include "vr_dpdk_usock... |
/*
* ELF object format helpers - x86:x86
*
* Copyright (C) 2004-2007 <NAME>
*
* 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, t... |
/********************************************************************************/
/* */
/* TPM Host IO */
/* Written by <NAME> ... |
/*-------------------------------------------------------------------------
*
* hashinsert.c--
* Item insertion in hash tables for Postgres.
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.7 1996/11/05... |
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "lice... |
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2017 <NAME> <<EMAIL>>
*/
/*
* Perform a small read on every file in a directory tree.
*
* Useful for testing file systems like proc, sysfs and debugfs or anything
* which exposes a file like API so long as it respects O_NONBLOCK. This test
* is not ... |
#include "pch.h"
#include <microratchet.h>
static const uint32_t sh256initstate[8] = {
0x6a09e667,
0xbb67ae85,
0x3c6ef372,
0xa54ff53a,
0x510e527f,
0x9b05688c,
0x1f83d9ab,
0x5be0cd19
};
static const uint32_t k[] =
{
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5e... |
/*
* Copyright (C) 2014 BlueKitchen GmbH
*
* 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 follo... |
/******************************************************************************
* Copyright (C) 2017 Broadcom. The term "Broadcom" refers to Broadcom Limited
* and/or its subsidiaries.
*
* This program is the proprietary software of Broadcom and/or its licensors,
* and may only be used, duplicated, modified or... |
/*
* Copyright 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 version.
*
* This library is distri... |
/*
Copyright (C) 2014-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... |
/* libs/diskconfig/diskconfig.c
*
* Copyright 2008, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
#include <stdio.h>
#include "ast.h"
#include "y.tab.h"
#include "replacer.h"
#include "synthesizer.h"
#include "addresser.h"
#include "cmpAndDstrFuncs.h"
#include "userMacroReplacer.h"
#include "includeReplacer.h"
extern FILE* yyin;
extern int yylex();
extern int yyparse(InstructionList *list, UserMacroTable *userMacr... |
/*
Copyright 2004-2006, UCAR/Unidata
See COPYRIGHT file for copying and redistribution conditions.
This is part of netCDF.
This program also takes a long time to run - it writes some data in
a very large file, and then reads it all back to be sure it's
correct.
This program is an add-on test to chec... |
/*
* @file servo.c
*
* @author <NAME>
*
* @version 0.9
*
* @copyright Copyright (C) Parallax, Inc. 2012. See end of file for
* terms of use (MIT License).
*
* @brief Manages control of up to 14 servos using another CMM/LMM cog.
*
* Please submit bug reports, suggestions, and improvements to
* thi... |
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright (c) 2019 Intel Corporation
*/
/**
* @file libnes_lookup.c
* @brief Implementation of nes library for lookups
*/
#include <assert.h>
#include <rte_hash_crc.h>
#include <rte_malloc.h>
#include <rte_hash.h>
#include <rte_memcpy.h>
#include <rte_jhash.h>
#includ... |
/*
A simple 2D hydro code
(C) <NAME> : CEA/IRFU -- original F90 code
(C) <NAME> : IDRIS -- original F90 code
(C) <NAME> : CEA/DAM -- for the C version
*/
/*
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can ... |
/**
* Copyright (c) 2020 Analog Devices, Inc. All Rights Reserved.
* This software is proprietary to Analog Devices, Inc. and its licensors.
*
* Use of this file is governed by the license agreement
* included in this repository.
*
* @file test_imu_buffer_data_seq_burst_mode.c
* @author <NAME> (<EMAIL... |
/* GStreamer Intel MSDK plugin
* Copyright (c) 2018, Intel Corporation
* Copyright (c) 2018, <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 m... |
/*
* --INFO--
* Address: 801F6938
* Size: 000194
*/
void __OSInitAudioSystem(void)
{
/*
.loc_0x0:
mflr r0
lis r3, 0x802E
stw r0, 0x4(r1)
addi r4, r3, 0x7468
lis r3, 0x8100
stwu r1, -0x30(r1)
li r5, 0x80
stmw r25, 0x14(r1)
bl -0x1F354... |
/* cdfchi.f -- translated by f2c (version 20190311).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of... |
/*
* Routines to access hardware
*
* Copyright (c) 2013 Realtek Semiconductor Corp.
*
* This module is a confidential and proprietary property of RealTek and
* possession or use of this module requires written permission of RealTek.
*/
#include "PinNames.h"
#include "basic_types.h"
#include "diag... |
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <stdbool.h>
#include <cmocka.h>
#include "common/buffer.h"
static void test_buffer_can_read(void **state) {
(void) state;
uint8_t temp[20] = {0};
buffer_t buf = {.ptr = temp, .size = sizeof(temp), .offset = 0};
... |
/* Copyright (c) 2011, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope... |
/*
* this currently only works for ethernet bootp's -- presotto
*/
#include <u.h>
#include <libc.h>
#include <ip.h>
#include <bio.h>
#include <ndb.h>
#include "dat.h"
static void check72(Info *iip);
Ndb *db;
char *ndbfile;
Iplifc*
findlifc(uchar *ip)
{
uchar x[IPaddrlen];
Ipifc *ifc;
Iplifc *lifc;
for(ifc = ... |
/*
* Copyright (C) 2012 RoboVM AB
*
* 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 ... |
#include <string.h>
#include <ctype.h>
#include "dpi/dpi_module.h"
#define VALID_LONG_MESSAGE_TYPE(id) \
((id) == 'T' || (id) == 'D' || (id) == 'd' || (id) == 'V' || \
(id) == 'E' || (id) == 'N' || (id) == 'A')
#define MAX_STARTUP_PACKET_LENGTH 10000
#define POSTGRESQL_HEADER_LEN 5
#define POSTGRESQL_LENGTH_LEN 4... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdarg.h>
#ifndef CALCULATOR
#include <inttypes.h>
#endif
#include "dungeon.h"
/* LCG PRNG parameters tested against
* Knuth vol. 2. by the original authors */
#ifndef CALCULATOR
#define LCG_A 1093UL
#define LCG_C 221587UL
#define LCG_M 1048576UL
... |
/* Copyright Statement:
*
* (C) 2005-2016 MediaTek Inc. All rights reserved.
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licens... |
/*
* tdd.c Copyright (C) 1999 Asle / ReDoX
* Copyright (C) 2006-2007 <NAME>
*
* Converts TDD packed MODs back to PTK MODs
*/
#include <string.h>
#include <stdlib.h>
#include "prowiz.h"
static int test_tdd (uint8 *, int);
static int depack_tdd (FILE *, FILE *);
struct pw_format pw_tdd =... |
/**
Copyright 2009-2018 National Technology and Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government
retains certain rights in this software.
Sandia National Laboratories is a multimission laboratory managed and operated
by National Technology and Engineering... |
// Copyright (C) 2015-2021 Virgil Security, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// (1) Redistributions of source code must retain the above copyrigh... |
/*
* Beatmania DJ Main Board (GX753)
* emulate video hardware
*/
#include "emu.h"
#include "video/konicdev.h"
#define NUM_SPRITES (0x800 / 16)
#define NUM_LAYERS 2
UINT32 *djmain_obj_ram;
static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect)
{
running... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
// Copyright (C) 2018 <NAME>. See included LICENSE file.
#define DRED_CONTROL_TYPE_TEXTBOX "dred.textview.textbox"
typedef struct dred_textbox dred_textbox;
#define DRED_TEXTBOX(a) ((dred_textbox*)(a))
typedef void (* dred_textbox_on_text_changed_proc)(dred_textbox* pTextBox);
struct dred_textbox
{
// A text b... |
/** \file src/app/ad9361/map-device.c
* \brief Commands for switching between two ADIs on the fly
* \copyright Copyright 2013,2014 Silver Bullet Technology
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with th... |
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <assert.h>
#include "main.h"
#include "align.h"
#include "util.h"
#include "samrecord.h"
uint32_t record_hash(SAMRecord *record)
{
if (record->hashed)
return record->hash;
const uint32_t hash = hash_ident(rec... |
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2012, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the pa... |
/*
* MIT License
*
* Copyright (c) 2019 <NAME> <<EMAIL>>
* and Contributors
*
* 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 rig... |
/*
* Copyright (c) 2011 <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 of... |
//
// Copyright 1998-2012 <NAME>
//
// 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... |
/*****************************************************************************/
/* */
/* Copyright (C) 1997-2002 <NAME> */
/* *... |
/*
@@@@ PROGRAM NAME: knkcch17proj02.c
@@@@ FLAGS: -std=c99
@@@@ PROGRAM STATEMENT:
Modify the inventory.c program of Section 16.3
so that the p (print) command calls qsort to sort the inventory array before it
prints the parts.
*/
#include <stdio.h>
#include <stdlib.h> //NULL, exit(), EXIT_FAILURE, free(), qsort()... |
/*--------------------------- MegaWave2 Module -----------------------------*/
/* mwcommand
name = {flstb_dual};
version = {"1.1"};
author = {"<NAME>"};
function = {"Level lines passing through centers of dual pixels in bilinear image"};
usage = {
bilinear_tree->pTree "The bilinear tree of the image",
... |
/*
* Copyright 2015 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, m... |
/*
* Copyright (c) 2015, <NAME>
* MIT License
*
* SSD1306 demo of block and font drawing.
*/
//
// fixed for OrangePiZero by HypHop
//
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdint.h>
#include <unistd.h>
#include <netdb.h>
#include <net/if.h>
#in... |
/*
* Copyright (c) 2021, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
*
* Copyright 2021, UT-Battelle, LLC.
*
* LLNL-CODE-741539
* All rights reserved.
*
* This is the license for UnifyFS.
* For details, see https://github.com/LLNL/UnifyFS.
* Please rea... |
#include "main.h"
#include "display.h"
#include "oled.h"
#include "menu.h"
// Declare menu and menu items (should be in global space)
//struct Menu menuMain;
struct menuItem menuItemCalibrate;
struct menuItem menuItemCurrent;
struct menuItem menuItemStepSize;
struct menuItem menuItemEnablePin;
struct menuItem menuItem... |
/* $OpenBSD: build.c,v 1.13 2009/10/27 23:59:42 deraadt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME> at The University of Guelph.
*
* Redistribution and use in source and binary fo... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "mruby.h"
#include "mruby/compile.h"
#include "mruby/value.h"
#include "mruby/array.h"
#include "mruby/string.h"
#include "mruby/hash.h"
#include "mruby/dump.h"
#include "mruby/proc.h"
#include "da_funk.h"
#define DONE mrb_gc_arena_restore(mrb, 0)
#... |
// From: http://www.csee.usf.edu/~kchriste/tools/genzipf.c
//==================================================== file = genzipf.c =====
//= Program to generate Zipf (power law) distributed random variables =
//===========================================================================
//= Notes: 1) Writes t... |
/*
* Copyright (c) 2012, 2014-2015, JANET(UK)
* 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 lis... |
/*
* (C) Copyright 2010,2011
* NVIDIA Corporation <www.nvidia.com>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* 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 Fou... |
#include <unistd.h>
#define TAG "rfm95"
#include <esp_log.h>
#include <driver/gpio.h>
#include <driver/uart.h>
#include <esp_sleep.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "module.h"
#include "rfm95.h"
#include "spi.h"
#define MILLISECOND 1000
// The FIFO_THRESHOLD value should allow ... |
/*
* ============================================================================
* Copyright (c) 2009-2010 Marvell International, Ltd. All Rights Reserved
*
* Marvell Confidential
* ============================================================================
*/
// public includes
#inc... |
/*
* record_mgr_serde.c
*
* Created on: Nov 1, 2015
* Author: heisenberg
*/
#include "dberror.h"
#include "malloc.h"
#include "record_mgr.h"
#include "tables.h"
#include "string.h"
unsigned int getSerSchemaSize(Schema *);
inline void serialize_intBin(int, SerBuffer *);
inline void serialize_uintBin(unsign... |
/* File: tree.c
* Author: <NAME> (<EMAIL>)
* Copyright (C) <NAME>, Cambridge University, 2019
*-------------------------------------------------------------------
* Description:
* Exported functions:
* HISTORY:
* Last edited: May 10 13:58 2020 (rd109)
* Created: Sat Nov 16 10:07:06 2019 (rd109)
*-----------... |
/*
(c) 2016 Copyright Vaclav2016 https://github.com/vaclav2016, jabber id <EMAIL>
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software... |
/*
This file is part of SSCA1.
Copyright (C) 2008-2015, UT-Battelle, LLC.
This product includes software produced by UT-Battelle, LLC under Contract No.
DE-AC05-00OR22725 with the Department of Energy.
This program is free software; you can redistribute it and/or modify
it under the terms of the Ne... |
/*
* Copyright (c) 2015, <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 of... |
/*
* Copyright (c) 2011, 2017 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementation of the... |
#include <stdio.h>
#include <string.h>
#include "common.h"
#include "scanner.h"
struct Scanner {
const char *start;
const char *current;
int line;
};
struct Scanner scanner;
void init_scanner(const char *source)
{
scanner.start = source;
scanner.current = source;
scanner.line = 1;
}
static bool is_alpha(char... |
/**********************************************************************
*
* PostGIS - Spatial Types for PostgreSQL
* http://postgis.net
*
* Copyright (C) 2012 <NAME> <<EMAIL>>
* Modifications Copyright (c) 2017 - Present Pivotal Software, Inc. All Rights Reserved.
*
* This is free software; you can redistribute... |
#include "http-cookie.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "cstringext.h"
#define isblank(c) (' '==(c) || '\t'==(c))
struct http_cookie_t
{
char* cookie;
const char *name;
const char *value;
const char *path;
const char *domain;
const char ... |
/*!
* @file
* @brief This file contains implementation of cpu side for phong shading.
*
* @author <NAME>, <EMAIL>
*
*/
#include <assert.h>
#include <math.h>
#include "student/student_cpu.h"
#include "student/student_pipeline.h"
#include "student/linearAlgebra.h"
#include "student/uniforms.h"
#include "student/g... |
/*
* Copyright 2011, 2016 <NAME>
*
* 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 discl... |
/*
* Copyright (c) 2020-2021 <NAME>
* Licensed under: MIT License
*/
#ifndef clogger_H
#define clogger_H
/** @file
* Single header console color logger library
*
* USAGE:
* // define imlpementation only a single *.c source file like this
* #define CLOGGER_IMPLEMENT
* #include "clogger.h"
*
* ... |
#include <limits.h>
#include "fixedpoint96.h"
void
initFixedPt(int64 i, uint32 f, fixedPt* result)
{
result->i = i;
result->f = f;
}
// logical shift
static void
shiftRightSigned(int64 input, uint shiftAmount, int64* result)
{
if (input < 0) {
*result = ~(~input >> shiftAmount);
} else {
*result = inp... |
/* cairo - a vector graphics library with display and print output
*
* Copyright © 2004 Red Hat, Inc
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* (the "LGP... |
/* $NetBSD: autoconf.c,v 1.61 2001/08/27 02:00:17 nisimura Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the ... |
#include <stdio.h>
#include <sys/time.h>
#include <stdbool.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define UMBRAL 10
#define REPETIR 15
// SELECTOR DE DIVISORES PARA LAS COTAS:
#define LOGN 1
#define NLOGN 2
#define NEXP 3
#define EXPN 4
#define SLOGN 5
#define LINEAL 6
/*****UTILIDADES PARA LA IN... |
#include "pins.h"
#include <Arduino.h>
#include <inttypes.h>
#include <vga.h>
GPIO_bank gpio_bank0, gpio_bank1, gpio_bank2, gpio_bank3;
struct Pin {
GPIO_bank* bank;
uint8_t pos;
};
struct Pin pin_map[32];
void init_pin_map() {
uint32_t base_addr = 0xbfc09200;
gpio_bank0.reg0_addr = (uint32_t*)(base... |
#include "internal.h"
// print the first 'bytes' bytes of 'text' to 'n', using alignment 'align'
// and requiring 'cols' columns, relative to the current cursor position.
// it is an error to call ncplane_putline() with more data than can be printed
// on the current row.
static inline int
ncplane_putline(ncplane* n, ... |
/* mpfr_log_ui -- compute natural logarithm of an unsigned long
Copyright 2014-2020 Free Software Foundation, Inc.
Contributed by the AriC and Caramba 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 the terms of the GNU... |
/**********************************************************************************************
*
* Faller Car Controller - NRF52 Firmware
*
* (c) 2019
* <NAME>
*
* all rights reserved
*
* Vehicle Follower: Track posisition of other vehicles broadcasted via adverstising and make
* make sure we don't crash into anoth... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectro... |
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
#include <getopt.h>
#include "mnemonic.h"
#include "tokenizer.h"
#include "util.h"
#define MNEMONIC_MAXKNOWN 256
#define MAXTOKENS 8192
#define TOKEN_MNEMONIC 0x1010
#define TOKEN_VARIABLE ... |
/*****************************************************************************\
** **
** FILE: editprefs.c **
** AUTHORS: Alexios **
**... |
/*
jit.concat
Copyright 2001 - Cycling '74
<NAME> <EMAIL>
*/
#include "jit.common.h"
#include "ext_strings.h"
typedef struct _jit_concat
{
t_object ob;
char concatdim;
char mode;
char autoclear;
char truncate;
} t_jit_concat;
void *_jit_concat_class;
t_jit_concat *jit_concat_new(void);
void jit_concat_f... |
#include "ap_utils.h"
#include "ap_light.h"
#include "ap_render.h"
#include "ap_shader.h"
#include "ap_cvector.h"
#include "ap_texture.h"
#define FLOAT_SIZE sizeof(float)
#define LIGHT_SIZE sizeof(struct AP_Light)
static struct AP_Vector point_light_vector = { 0, 0, 0, 0 };
static struct AP_Light direct_light;
static... |
#include "bytes.h"
#include "charset.h"
#include "entry.h"
#include "fs.h"
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <wchar.h>
static void loadLongFileNameEntry(FAT_LfnEntry *lfn, uint8_t buf[32])
{
lfn->ord = READLE(uint8_t, buf... |
/*****************************************************************************
File name: td_driver.c
Author: <NAME>
Date: 2/24/15
Class: CS480
Assignment: Compiler Project written in C
Purpose: Driver to test the Top Down Parser
Modifications:
Hours: 20
********************... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.