text stringlengths 3.08k 10.5k |
|---|
#include <grub/file.h>
#include <grub/disk.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#define IMGFILE "/tmp/test.fs.img"
extern struct grub_fs grub_ext2_fs;
grub_err_t read_foo (struct grub_disk *disk, grub_disk_addr_t sector, grub_size_t size, char *buf) {
// printf ("==> DISK... |
#include <stdint.h>
#include "sgstring.h"
#include "configfile.h"
#include "avr8_io.h"
#include "avr8_cpu.h"
#include "diskimage.h"
#include "avr8_eeprom.h"
/* EECR - EEPROM Control Register */
#define EECR_EEPM1 (1 << 5)
#define EECR_EEPM0 (1 << 4)
#define EECR_EERIE (1 << 3)
#define EECR_EEMPE (1 << 2)
#defi... |
#include <stdlib.h>
#include <stdio.h>
#include <SDLColor.h>
#include <SDL.h>
/*
* ─── FONCTION DE MANIPULATION DE PIXELS ─────────────────────────────────────────
*/
Uint32 getpixel(SDL_Surface *surface, int x, int y){
int bpp = surface->format->BytesPerPixel;
Uint8 *p = (Uint8 *)surface->pixels + y *... |
// Copyright 2018,2020 Abaco Systems
// 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 wr... |
/*-------------------------------------------------------------------------
*
* ginlogic.c
* routines for performing binary- and ternary-logic consistent checks.
*
* A GIN operator class provides a consistent function which checks if a
* tuple matches a qual, when the given set of keys are present in the tuple.... |
/*---------------------------------------------------------------------------
Copyright (c) 2013 <NAME>
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 c... |
#include "malloc.h"
#define CHIPS_IMPL
#include "probe.h"
#include "chips/m6502.h"
#include "chips/m6522.h"
#include "chips/m6561.h"
#include "chips/kbd.h"
#include "chips/mem.h"
#include "chips/clk.h"
#include "systems/c1530.h"
#include "systems/vic20.h"
#define MAX_SAMPLES 4096
float sample_buffer[MAX_SAMPLES];
... |
/*
* visual studio code lint and intellisense.
* contains initialize serial code.
* also show a way to inject code before main function.
*/
#ifdef __VS_CODE__
#ifndef __VS_CODE_H__
#include <msp430.h>
#define interrupt
#define nullptr 0x00L
#define __data20_write_long(x,y)
#endif // !__VS_CODE_... |
/* =======================================================================
* ncl_hash_table.c
* Copyright (c) 2020 <NAME>
* =======================================================================
*/
#include "ncl_hash_table.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#define NEXT(i, max) (((i)+... |
#include "input_base.h"
#include "video_base.h"
#include <GLFW/glfw3.h> // GLFW helper library
#include "inputact.h"
#include "shared.h"
#define MAX_JOYSTICKS 16
int Backend_Input_Update() {
glfwPollEvents();
return 1;
}
uint16 joystates_prev[MAX_JOYSTICKS];
uint16 joystates[MAX_JOYSTICKS];
void Update_Joystick... |
/*-
* BSD LICENSE
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* Copyright (c) 2017, Western Digital Corporation or its affiliates.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are ... |
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include "pbc.h"
static void
read_file(const char *filename , struct pbc_slice *slice) {
FILE *f = fopen(filename, "rb");
if (f == NULL) {
fprintf(stderr, "Can't open file %s\n", filename);
exit(1);
}
fseek(f,0,SEEK_END);
slice->l... |
#include <avr/power.h>
#include <util/delay.h>
#include <math.h>
#include "SymonSign.h"
extern void blastRow(unsigned char redBuf[SIGN_WIDTH / 8], unsigned char greenBuf[SIGN_WIDTH / 8]);
// buffer, color, height, width
unsigned char screenBuf[2][2][SIGN_HEIGHT][SIGN_WIDTH / 8];
unsigned char curDispBuf; // ... |
#include "stdio.h"
#include "gpio_handler.h"
#include "string.h"
#include "driver/gpio.h"
#include "cJSON.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "gpio_config_parser.h"
#include "iot2tangle.h"
#include "../mqtt_handler.h"
enum pinMode pinmode_of(char* str_mode){
if (strcmp(str_mode, ... |
#include <string.h>
#include <stdio.h>
#include "db.h"
/*
Teeb stringist uue koopia.
*/
char *strcopy(char *string) {
char *ret=malloc(strlen(string)+1);
strcpy(ret, string);
return ret;
}
/*
Uue failide struktuuri tipu loomine.
*/
TFILE *newFile() {
TFILE *f=malloc(sizeof(TFILE));
f->name=N... |
#include <celib/macros.h>
#include <celib/memory/allocator.h>
#include <celib/fs.h>
#include <celib/ydb.h>
#include "celib/id.h"
#include "celib/memory/memory.h"
#include "celib/api.h"
#include "celib/module.h"
#include <celib/cdb.h>
#include <cetech/ecs/ecs.h>
#include <cetech/renderer/renderer.h>
#include <cetech... |
/*
** mouse:~ppr/src/ipp/ipp_to_str.c
** Copyright 1995--2006, Trinity College Computing Center.
** Written by <NAME>.
**
** This file is part of PPR. You can redistribute it and modify it under the
** terms of the revised BSD licence (without the advertising clause) as
** described in the accompanying file LICENSE.tx... |
/*
* MCQuantization.c
* dither Utility
*
* Quantization algorithm implementation.
*
*/
#include <MCQuantization.h>
#include <stdlib.h>
#include <math.h>
#define NUM_DIM 3
typedef struct {
MCTriplet min;
MCTriplet max;
mc_uint_t size;
MCTriplet *data;
} MCCube;
static mc_byte_t dim; /* current cube bigg... |
/* OX: Open-Channel NVM Express SSD Controller
*
* - OX Controller argument parser
*
* Copyright 2016 IT University of Copenhagen
*
* Written by <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define XX 20+1
void check_args(int argc, char *argv[]);
char ***scan_file(char ***mat, int argc, char *argv[]);
FILE *open_file(char *filename, char *mode);
char ***order(char ***mat, int rr, int cc);
int main(int argc, char *argv[])
{
char ***mat = 0;
... |
//*****************************************************************************
//
// script_editor.c
//
// this is an extention of the basic script editor (/src/editor/editor.h) to
// be tailored for script editing. Provides syntax coloring and line number
// display, and auto indenting.
//
//*************************... |
/*******************************************************************************
* Copyright (C) 2004-2006 Intel Corp. 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... |
/* Copyright (c) 2002-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "base64.h"
#include "buffer.h"
#include "unichar.h"
#include "charset-utf8.h"
#include "quoted-printable.h"
#include "message-header-decode.h"
static size_t
message_header_decode_encoded(const unsigned char *data, s... |
/*
Author: <NAME> <<EMAIL>>
Copyright (c) 2014 Cromulence LLC
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... |
/*
Modified codes from AFL's QEMU mode (original license below).
-----------------------------------------------------------------
Written by <NAME> <<EMAIL>> and
<NAME> <<EMAIL>>
Idea & design very much by <NAME>.
Copyright 2015, 2016 Google Inc. All rights reserved.
Licensed... |
/*---------------------------------------------------------------------------*\
FILE........: dac_ut.c
AUTHOR......: <NAME>
DATE CREATED: May 31 2013
Plays a 500 Hz sine wave sampled at 16 kHz out of PA5 on a Discovery board,
or the speaker output of the SM1000.
\*------------------------------------------... |
/*
*
* Copyright (c) International Business Machines Corp., 2001
*
* 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 l... |
/*-
* Copyright (c) 2004-2009 Apple Inc.
* Copyright (c) 2006 <NAME>
* Copyright (c) 2016 <NAME>
* All rights reserved.
*
* Portions of this software were developed by BAE Systems, the University of
* Cambridge Computer Laboratory, and Memorial University under DARPA/AFRL
* contract FA8650-15-C-7558 ("CADETS"),... |
#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
#include<string.h>
typedef struct tree_node_s {
float frequency;
char c;
char code[128];
struct tree_node_s *left;
struct tree_node_s *right;
} tree_node_t;
tree_node_t *arr[26], *letters[26];
void findMinAndSecondMin(tree_node_t ... |
//
// Created by lujun on 19-6-28.
//
// This contains SIN_COS , clarke, inv_clarke, park, inv_park and pid
// each one has it's own function.
// All function can be found in main function.
// If you don't want to use it, then comment it.
#include "riscv_common_tables.h"
#include "riscv_const_structs.h"
#include "riscv... |
/*! @file WENOInitialize.c
@brief Initializes the WENO-type schemes
@author <NAME>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <interpolation.h>
#include <mpivars.h>
#include <hypar.h>
int WENOFifthOrderCalculateWeights (double*,double*,double*,int,void*,void*);
int WENOFifthOrde... |
// https://msdn.microsoft.com/en-us/library/bb259689.aspx
#include <math.h>
#include <string.h>
#include "bing.h"
#ifndef PI
#define PI 3.14159265358979323846
#endif
//static const double EarthRadius = 6378137.0;
static const double MinLatitude = -85.05112878;
static const double MaxLatitude = 85.05112878;
static c... |
/* j - check for important jobs hiding in who knows what terminal
*
* matched processes whose TTY matches those of a tmux(1) window will
* have the TTY replaced with the tmux(1) session and window index as
* finding or getting to "re:1" is easier than locating "ttyp9":
*
* $ j
* PID TTY CMD
* 920... |
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
//#include <pthread.h>
#include <sys/time.h>
#define _GNU_SOURCE
char* getId();
char* getJob(char*);
int receiveWait; //how long to sleep when waiting for messages from broadcaster
int sendWait; //how long tp sle... |
#ifndef FOURCC
#define FOURCC(a, b, c, d) ((a)|((b)<<8)|((c)<<16)|((d)<<24))
#endif
#ifndef TWOCC
#define TWOCC(a, b) ((a)|((b)<<8))
#endif
#ifndef TWOCC_A
#define TWOCC_A(t) ((a)&0xFF)
#endif
#ifndef TWOCC_B
#define TWOCC_B(t) (((a)>>8)&0xFF)
#endif
#ifndef FOURCC_ABCD
#define FOURCC_ABCD
#define FOURCC_A(t) ((a)&... |
/*****************************************************************************
* Copyright (c) 2016 The University of Tokyo
* This software is released under the MIT License, see LICENSE.txt
*****************************************************************************/
#include "hecmw_vis_mesh_extent.h"
#include <... |
#include "biquad.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifndef M_PI
#define M_PI (3.141592654)
#endif
biquad* bq_new(int filter_type,
float frequency,
float Q,
float dbGain,
int sample_rate){
biquad* tmp = (biquad*)malloc(sizeof(biquad));
if (tmp == NULL){
printf("Error wh... |
enum iflags {
BBENTRY = 1, /* basic block entry */
};
enum tflags {
SIGNF = 1 << 0, /* Signed type */
INTF = 1 << 1, /* integer type */
FLOATF = 1 << 2, /* float type */
STRF = 1 << 3, /* string */
AGGRF = 1 << 4, /* aggregate */
FUNF = 1 << 5, /* function *... |
/* Copyright 2018 Canaan 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 agree... |
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <pthread.h>
#include <fcntl.h> // for open
#include <unistd.h> // for close
#include<arpa/inet.h>
#include<sys/types.h>
#include<netinet/in.h>
#define MAX 1024
#define PORT 8083
#define SA struct sockaddr
... |
/*
* Copyright (c) 2018 Mellanox Technologies, Ltd. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of th... |
/*
* Copyright 2011 <NAME> <<EMAIL>>
*
* This file is part of DistNumPy <https://github.com/distnumpy>.
*
* DistNumPy is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
... |
/*-
* Copyright (c) 2006, <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 c... |
/*
* This file is part of the hoverboard-firmware-hack project.
*
* Copyright (C) 2017-2018 <NAME> <<EMAIL>>
* Copyright (C) 2017-2018 <NAME> <<EMAIL>>
* Copyright (C) 2017-2018 <NAME> <<EMAIL>>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public Licen... |
#include <stdio.h>
#include<stdlib.h>
#define ROWCOL 8
int board[8][8];
void printSolution();//prints the current solution
void reset();//sets everything on the board to 0
int solution =0;//Saves the nubmer of sultions that work that we have found
void unmark(int row, int col);
void mark(int row, int col);
i... |
/*
*********************************************************************************************************
* EXAMPLE CODE
*
* (c) Copyright 2009-2014; Micrium, Inc.; Weston, FL
*
* All rights reserved. Protected by international ... |
/* Copyright (c) 2010, <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
* notice, this list of conditio... |
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_AVR)
#include <Arduino.h>
#endif
#include <stdint.h>
#include "FastAccelStepper.h"
#include "common.h"
#if defined(ARDUINO_ARCH_AVR)
#define stepPinStepperA 8 /* OC4A */
#define stepPinStepperB 7 /* OC4B */
#endif
// Here are the global variables to interface ... |
/**
* EPCI FIFO black box test programm
* based on https://github.com/Martoni/pcie_debug.git
*/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <signal.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>... |
/*
* (C) Copyright 2000-2003
* <NAME>, DENX Software Engineering, <EMAIL>.
*
* 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 Softwa... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "utilities.h"
void argsCheck(ARGINFO* cmdargs, int argc, char** argv){
if(
// check if the command-line options provided are valid
(cmdline_parser(argc, argv, cmdargs) != 0 || argc == 1)
// check if --infile and --outfile are... |
/*
Copyright 2021 Picovoice Inc.
You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
file accompanying this source.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an ... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
... |
/**
* XMLPARSEP.H -- Internal XML parser definitions.
*
* @file xmlParseP.h
* @author <NAME> and <NAME>
* @date 8/03/09
*
* @brief Internal XML parser definitions.
*/
#include <expat.h>
#define VOT_DOC_VERSION "1.2" /** VOTable document version (write) */
#define VOT_XSI "http:... |
#include "config.h"
#include "crypto/bn.h"
#include "tl-parser/portable_endian.h"
#include "tgl.h"
#include "tools.h"
#include "mtproto-utils.h"
static unsigned long long gcd (unsigned long long a, unsigned long long b) {
return b ? gcd (b, a % b) : a;
}
static int check_prime (struct tgl_state *TLS, TGLC_bn *p) {
... |
/*****************************************
Copyright 2008 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 requir... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* textures.c :+: :+: :+: ... |
// arpnd filter
/*
* eBPF program to attach to a spine facing interface, listening for VXLAN packets
*
* This sample version only looks for ARP packets, and sends the source MAC/IP
* to userspace (once)
*/
// #define KBUILD_MODNAME "filter"
#include <linux/bpf.h>
// #include <bpf_helpers.h>
#include <linux/if_e... |
//=================================================================
//File: error_handling.c
//Author: <NAME>
//Description: Provides error-handling for
//evaluator, avoiding crashes in program.
//compile: gcc -std=c99 -Wall mpc.c error_handling.c -o errhandle
//========================================================... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cellule.h"
#include "liste.h"
#include "graphe.h"
void initialiser_graphe(graphe_t* graphe, char* str){
char buffer[41];
int tmp, i, nb_arretes = 0, fin = 0;
liste_t l1, l2;
cellule_t *c1, *c2, *tmp1, *tmp2;
int **arretes;
FILE* f;
f = fop... |
/*-
* Copyright (c) 2016, <NAME>
* Copyright (c) 2010 <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
* not... |
// Copyright (C) Stichting Deltares, 2012-2016.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 3,
// as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// b... |
#include "syncer.h"
/*
* Execs rsync and creates a new backup for the given snapshot interval.
*
* Does not return on success or returns on error.
*/
void
execrsync(const struct endpoint *ep, const char *destdir, const char *linkdest)
{
int i;
const char *rsyncbin;
char **rsyncargv;
char *fmt, *tmp;
rsyncarg... |
/*
job.c
Author: <NAME> <<EMAIL>>
Copyright (c) 1998 <NAME> <<EMAIL>>, <NAME>,
All rights reserved.
Created: Tue Nov 10 03:54:09 IST 1998
Code for managing job control, manipulating processes, etc.
*/
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <signal.h>
#include "coward.h"
... |
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include <unistd.h>
#include <fcntl.h>
#include <getopt.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
/*
Crude test of this program:
for size in 0 1 2 7 8 9 15 16 17 18 29;
do ./knownfile --size=$size toto.$size ;
... |
#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... |
/*
* Phoenix-RTOS
*
* Operating system kernel
*
* Jffs2 FileSystem - system specific information.
*
* Copyright 2018 Phoenix Systems
* Author: <NAME>
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#include "../phoenix-rtos.h"
#include <fcntl.h>
#include <sys/mman.h>
#include "mtd.h"
typedef st... |
//
// Advent of Code 2021
//
// Day 15
//
// Author: <NAME>
//
// Thought process:
// I think Dijkstra's algorithm is a good fit for this one, so I'm going for it
// Use second array to mark visited nodes, third for distances
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "heap.h"
#define FIL... |
/*
* Copyright (c) 2012 oldfaber _at_ gmail.com
*
* 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 "AS IS" AND T... |
/**
******************************************************************************
* File Name : freertos.c
* Description : Code for freertos applications
******************************************************************************
* This notice applies to any and all portions of this file
... |
#define GPIO_COUNT 64
#define GPIO_NONE 0x00
#define GPIO_IN 0x01
#define GPIO_OUT 0x02
#define GPIO_PWM 0x03
#define CHECK_GPIO_NUM(gpio) do { if ((gpio < 0) || (gpio >= GPIO_COUNT)) return -1; } while (0)
//--------------------------------------------------------------------------------... |
/*
* Copyright (C) 2020 Southern Storm Software, Pty Ltd.
*
* 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, ... |
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <stdlib.h>
#include <libdstr/libdstr.h>
#include <libcrypto/libcrypto.h>
#include <libditm/libditm.h>
#include "ditm_thread.h"
// if the thread fails
static derr_t thread_error = {0};
... |
/*
* Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the zlib License.
* You may obtain a copy of the License at
*
* https://www.zlib.net/zlib_license.html
*
* This program is distrib... |
/*******************************************************
Copyright (C) 1995 <NAME>
All rights reserved
This file is part of yaehmop.
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 r... |
/*
# Copyright (c) 2012, The Met Office, 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
# list of conditi... |
/*
* Copyright (c) 2011 Mellanox Technologies. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved.
* Copyright (c) 2019 Huawei Technologies Co., Ltd. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "coll_ucx.h"
sta... |
/*-
* Copyright (c) 2015, <NAME>
*
* 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 "AS IS" AND THE AUTH... |
#include<stdio.h>
#include<stdlib.h>
#include<stdlib.h>
#include<ctype.h>
#include<string.h>
#define MAXL 100
typedef struct a{
int para;
int power;
struct a* next;
}node,*pnode;
void sort(pnode h);
void derv(pnode h);
void print(pnode h);
void change(pnode i,pnode j);
char temp[MAXL];
voi... |
/*
* If not stated otherwise in this file or this component's Licenses.txt file the
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
*
* 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 ... |
#include "m_pd.h"
/* -------------------------- linp~ ------------------------------ */
static t_class *linp_tilde_class;
typedef struct {
t_object obj;
t_sample target; /* target value of ramp */
t_sample value; /* current value of ramp at block-borders */
t_sample biginc;
t_sample inc;
t_float coefn;
t_floa... |
#include "lab5_dlist.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void dlistFreeNodes(dlist this);
typedef struct Node {
char *key;
struct Node *next;
dlistValue value;
} node_t;
typedef struct List {
node_t *head;
dlistValueType type;
int length;
} list_t;
dlist createDlist(dlistValueT... |
#define F_CPU 20000000
#include <atmel_start.h>
#include <util/delay.h>
#include <avr/pgmspace.h>
#include <tca.h>
extern volatile uint8_t measurement_done_touch;
extern volatile uint8_t LED_PWM[5];
extern volatile uint16_t timeTicks;
// Logarithmic brightness levels
const uint8_t pwm_log[] = {30,43,59,78,102,137,1... |
// Mutual exclusion spin locks
/* Any code that accesses shared data must have a strategy for
maintaining correctness despite concurrency.
Concurrency may arise from:
. multiple threads
. multiple cores (CPUs)
. interrupt handler?
A lock is one such strategy.
Interrupts deserve special at... |
/**************************************************************************
* This code is licensed under the Apache License 2.0. See ../LICENSE *
* Copyright 2017 <NAME> *
* *
* main.c - main entry ... |
#include "gpio.h"
#include "uart.h"
#include "printf.h"
#include "mailbox.h"
#include "irq.h"
#include "timer.h"
#include "sched.h"
#include "mm.h"
#include "buddy.h"
#include "string.h"
#define S_MAX 1000
void read_string(char *buf){
int i=0;
char single; // Important that this in an int to distinguish EOF ... |
#pragma ident "$Id: main.c,v 1.6 2016/08/04 22:34:48 dechavez Exp $"
/*======================================================================
*
* Update lookup table with Q330 identifiers
*
*====================================================================*/
#define INCLUDE_ISI_STATIC_SEQNOS
#include "q330.h"
#... |
/*
* A stupid but useful crypt program
* Two methods :
* - swap byte : swap each pair of bytes.
* - xor : xor all bytes with a passwd
*
* RoBo - May 2003
*/
#include <string.h>
#ifdef WIN32
#include "getopt.h"
#else
#include <unistd.h>
#endif
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>... |
#include <inttypes.h>
#include <string.h>
#define LOG_TAG "server"
#include <dslink/log.h>
#include <dslink/socket_private.h>
#include <dslink/mem/mem.h>
#include <uv-common.h>
#include <broker/upstream/upstream_handshake.h>
#include "broker/utils.h"
#include "broker/broker.h"
struct Server {
mbedtls_net_context... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <common.h>
#include <wifi_event.h>
#include <network_ctrl.h>
#include <network_switch.h>
#include <hostapd_command.h>
#include <wpa_command.h>
#includ... |
#define CLK_HIGH() PORTB |= (1<<PB4)
#define CLK_LOW() PORTB &= ~(1<<PB4)
#define CS_HIGH() PORTB |= (1<<PB1)
#define CS_LOW() PORTB &= ~(1<<PB1)
#define DATA_HIGH() PORTB |= (1<<PB3)
#define DATA_LOW() PORTB &= ~(1<<PB3)
// DDRB = data direction register for Port B
// 0 = Input
// 1 = Output
#define INIT_PORT... |
/*
* Copyright (c) 2017 Etnaviv Project
* Copyright (C) 2017 Zodiac Inflight Innovations
*
* 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 limitat... |
#include "lah.h"
#include <math.h>
#include <time.h>
#include <stdlib.h>
/* Construct a diagonal matrix from n parameters */
lah_mat *lah_matConstructDiag(lah_index nC, const lah_value *parameter_vec)
{
lah_index i, j;
lah_index counter = 0;
lah_index isPositive = 1;
lah_mat *Res = lah_matAlloc(nC, nC, 1);
... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "chiodolo.h"
#define MAX 30
void trattino(){
int i=0;
for(i; i<167; i++){
printf("-");
}
printf("\n");
}
void startScreen(){
trattino();
printf(" ___\n");
printf(" _/ @@\\ OH NO!\n");
printf(" ... |
/* Copyright (C) 2001-2021 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license ... |
/**********************************************************************************
Avatar Tools
Copyright (c) 2019, National Technology and Engineering Solutions of Sandia, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the foll... |
#include <assert.h>
#include <stddef.h>
#include <string.h>
#include <kernel/armv7.h>
#include <kernel/cprintf.h>
#include <kernel/cpu.h>
#include <kernel/drivers/console.h>
#include <kernel/drivers/eth.h>
#include <kernel/drivers/gic.h>
#include <kernel/drivers/kbd.h>
#include <kernel/drivers/sd.h>
#include <kernel/d... |
#include <Uefi.h>
#include <Protocol/SimpleFileSystem.h>
#include <Library/DebugLib.h>
#include <util/gop_utils.h>
#include <Library/BaseLib.h>
#include "config.h"
#define CHECK_OPTION(x) (AsciiStrnCmp(line, #x "=", sizeof(#x)) == 0)
boot_entries_t boot_entries;
CHAR8* read_line(EFI_FILE_PROTOCOL* file... |
#include "Day23.h"
#include <stdio.h>
#define PART1_MAX_CUPS 9
#define PART1_ITERATIONS 100
#define PART2_MAX_CUPS 1000000
#define PART2_ITERATIONS 10000000
/// A Cup is a node in a cyclic linked list consisting of a number
/// and a pointer to the next node.
typedef struct Cup {
int value;
struct Cup* next;
} C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.