text stringlengths 3.08k 10.5k |
|---|
/////////////////////////////////////////////////////////////////////////////////
//////
////// Interface to LDL sparse linear solver
////// Copyright (C) 2005 <NAME> (lourakis at ics.forth.gr)
////// Institute of Computer Science, Foundation for Research & Technology - Hellas
////// Heraklion, Crete, Greece.
///... |
/******************************************************************************
*
* Copyright (C) 2017 - 2018 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... |
typedef struct svga_t
{
mem_mapping_t mapping;
uint8_t crtcreg;
uint8_t crtc[128];
uint8_t gdcreg[64];
int gdcaddr;
uint8_t attrregs[32];
int attraddr, attrff;
int attr_palette_enable;
uint8_t seqregs[64];
int seqaddr;
... |
/*
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License that accompanies this
distribution. The full text of the license may be found at
http://openso... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
/**************************************************************************
*
* Copyright 2008 HPCNL-KICS, UET, Lahore, PAKISTAN.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification,are permitted provided that the following conditions
* are met:
*
* ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gpt.h"
void init_tree(tree_t *ptr_tree) {
ptr_tree->root = NULL;
}
// create a node and return it.
node_t* make_node(char *key) {
node_t* temp = (node_t*)malloc(sizeof(node_t));
temp->key = (char*)malloc(1025*sizeof(char));
strcpy(temp->key, key... |
/*
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, distribut... |
/*! \file
Copyright (c) 2003, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from U.S. Dept. of Energy)
All rights reserved.
The source code is distributed under BSD license, see the file License.txt
at the top-level director... |
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <gmp.h>
// arrays to be populated by each thread
mpz_t *best_numbers;
unsigned int *best_levels;
// mutex for printing thread info
pthread_mutex_t print_mutex = PTHREAD_MUTEX_INITIALIZER;
// argument structure for explore_range function
typedef str... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* src/OPENSOLARIS.LICENSE
* or http://www.openso... |
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <hypervisor.h>
#include <schedule.h>
bool x2apic_enabled;
static void run_vcpu_pre_work(struct vcpu *vcpu)
{
uint64_t *pending_pre_work = &vcpu->pending_pre_work;
if (bitmap_test_and_clear(ACR... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <time.h>
#include <pthread.h>
#include <sys/time.h>
#include "read_ppm.h"
#include "mandelbrot_functions.h"
void getCoordinates(int i, int size, int * start_col, int * end_col,
int * start_row, int * end_row);
struct thread_da... |
#include "status_bar.h"
date_usec_t tv_to_usec(struct timeval *t)
{
return (USEC_PER_SEC * (int64_t)t->tv_sec) + t->tv_usec;
}
static int fill_time(char *buf, struct human_time_span *t)
{
char *start = buf;
if (t->days > 0) {
buf += sprintf(buf, "%dd ", t->days);
buf += sprintf(buf, "%02dh", t->hours);
... |
/*
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Mellanox Technologies, Inc.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
#include "test_resolve_peers.h"
#include "test_cd.h"
#include "src/util/outp... |
/*
* Copyright 2010-2018 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... |
/*
// Trabalho Pratico Programacao - LEI
// DEIS-ISEC 2019-2020
*
-> Criado por: <NAME>
-> Número de aluno: a2019137625
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "structs.h"
#include "utils.h"
#include "struct_recuar.h"
#include "struct_Sim.h"
#include "stru... |
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/*
* Copyright (C) 2011 Ruby-GNOME2 Project Team
* Copyright (C) 2006 <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 F... |
/*
* -----------------------------------------------------------------
* Programmer(s): <NAME>, <NAME> @ SMU
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2019, Lawrence Livermore National Security
* and Southern Methodist University.
* All r... |
#ifndef lint
static char sccsid[] = "@(#)qix.c 23.7 90/10/28 XLOCK SMI";
#endif
/*-
* qix.c - The old standby vector swirl for the xlock X11 terminal locker.
*
* Copyright (c) 1989-90 by Sun Microsystems Inc.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose... |
/*
* Copyright (c) 2007, Swedish Institute of Computer Science.
* 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
* n... |
#include "common.h"
#include "vkh_device.h"
#include "vkh_presenter.h"
#include "basic_tests.h"
void vkvg_present (options_t* opt, library_context_t* ctx) {
vkvg_flush (ctx->ctx);
VkhPresenter r = ctx->vkEngine->renderer;
if (!vkh_presenter_draw (r))
vkh_presenter_build_blit_cmd (r, vkvg_surface_get_vk_image(c... |
/*
* R : A Computer Language for Statistical Data Analysis
* Copyright (C) 2001-2016 the R Core Team
*
* 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... |
/*****************************************************************************
*
* test_pair_ss_cut.c
*
* Edinburgh Soft Matter and Statistical Physics Group and
* Edinburgh Parallel Computing Centre
*
* (c) 2014-2021 The University of Edinburgh
*
* Contributing authors:
* <NAME> (<EMAIL>)
*
*********... |
// There are some parts in the file that you need to modify, Please do
// not modify everything
// Modify only between the block which mentions what to modiy
// ===== DO NOT MODIFY BELOW THIS ======
#include "hw04.h"
void cleanup (FILE * fpin)
{
fclose (fpin);
}
// read the data, return true if success, false ... |
#include "ptest.h"
#include "../mpc.h"
#include <stdlib.h>
#include <string.h>
static int int_eq(const void* x, const void* y) { return (*(int*)x == *(int*)y); }
static void int_print(const void* x) { printf("'%i'", *((int*)x)); }
static int streq(const void* x, const void* y) { return (strcmp(x, y) == 0); }
static v... |
/*
G N O K I I
A Linux/Unix toolset and driver for the mobile phones.
This file is part of gnokii.
Copyright (C) 1999-2000 <NAME> & <NAME>.
Copyright (C) 1999-2000 <NAME>, <NAME>
Copyright (C) 1999-2006 <NAME>
Copyright (C) 2000-2002 <NAME>, <NAME>, <NAME>
Copyright (C) 2001 <NAME>, <NAME>... |
#include "blur.h"
/**
* get_sums - initialise sums for rgb and kernel
* @r_sum: pointer to sum of red values
* @g_sum: pointer to sum of green values
* @b_sum: pointer to sum of blue values
* @k_sum: pointer to sum of kernel values
* @portion: pointer to structure with information needed to blur
* @pixels: doub... |
/* Pci/pcmcia code for wavelan.c */
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "io.h"
#include "../port/error.h"
#include "../port/netif.h"
#include "etherif.h"
#include "wavelan.h"
static int
wavelanpcmciareset(Ether *ether)
{
int i;
char *p;
Ctlr *ctlr;
... |
/*
Copyright 2010-2013 SourceGear, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... |
/* send-message.c - send UDP datagram to remote application */
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
... |
/*
* Copyright (c) 2015, Freescale Semiconductor, Inc.
* Copyright 2016-2019 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "fsl_debug_console.h"
#include "fsl_i2c.h"
#include "fsl_flexio_i2c_master.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "board.h"
/*********... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NAME_MAX_LEN 50
typedef int (*compareFunctionType) ( const void *, const void * );
typedef struct {
int m_day;
int m_month;
int m_year;
} TDATE;
typedef struct {
char m_name[NAME_MAX_LEN];
char m_surname[NAME_MAX_LEN];
TDATE m_birthDate... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <limits.h>
typedef struct adjacency_list_node
{
int destination;
int weight;
struct adjacency_list_node *next;
} a_list_node;
typedef struct adjacency_node
{
struct adjacecy_list_node *head;
} a_list;
typedef stru... |
/* tilepro-dis.c. Disassembly routines for the TILEPro architecture.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published ... |
/*
* Copyright (c) 2015 Kaprica Security, 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, mer... |
/* -*- c -*- *****************************************************************
** Copyright (C) 2003 Sandia Corporation
** Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
** the U.S. Government retains certain rights in this software.
**
** This source code is released under the New BSD License.
... |
#include "general.h"
BOOL kernelCallbackCalled = FALSE;
NTSTATUS mapStatus = STATUS_UNSUCCESSFUL;
NTSTATUS driverStatus = 0xDEAD;
PVOID kernelBase;
PVOID driverBuffer;
// MSVC sometimes randomly decides to use winapi import
// and sometimes it just inlines it so let's just write
// it like this
__forceinline int Cus... |
/*
* Copyright 2015 <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 to in wr... |
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public Lic... |
/* $Xorg: miwideline.h,v 1.4 2001/02/09 02:05:22 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... |
/* KeyMgr backwards-compatibility support for Darwin.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of GCC.
GCC 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, or... |
// The Snipe editor is free and open source, see licence.txt.
#include "font.h"
#include "file.h"
#include <stdlib.h>
#include <assert.h>
#include <ft2build.h>
#include FT_FREETYPE_H
// Freetype is capable of producing high quality anti-aliased text. However, it
// is extremely easy to introduce unwanted extra anti-al... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <stdbool.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
/* The array below will hold the arguments: args[0] is the command. */
static char* args[512];
pid_t pid;
int com... |
/**
******************************************************************************
* @file SPI/SPI_FullDuplex_ComDMA/Src/stm32f7xx_msp.c
* @author MCD Application Team
* @brief HAL MSP module.
******************************************************************************
* @attention
*
* Copyright... |
/*
* libhugetlbfs - Easy use of Linux hugepages
* Copyright (C) 2005-2007 <NAME> & <NAME>, IBM Corporation.
*
* 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
... |
/*
* Broadcom specific AMBA
* ChipCommon core driver
*
* Copyright 2005, Broadcom Corporation
* Copyright 2006, 2007, <NAME> <<EMAIL>>
*
* Licensed under the GNU/GPL. See COPYING for details.
*/
#include "bcma_private.h"
#include <linux/export.h>
#include <linux/bcma/bcma.h>
static inline u32 bcma_cc_write32_... |
//Copyright (C) 2020 <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 to in writing, so... |
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "common.h"
#include "console.h"
#include "gpio.h"
#include "hooks.h"
#include "host_command.h"
#include "pwm.h"
#include "util.h"
#if... |
/* txCdsBadBed - Create a bed file with regions that don't really have CDS,
* but that might look like it.. */
/* Copyright (C) 2013 The Regents of the University of California
* See README in this or parent directory for licensing information. */
#include "common.h"
#include "linefile.h"
#include "hash.h"
#includ... |
/****************************************************************************************
Competition Golf Final Round
video hardware emulation
****************************************************************************************/
#include "driver.h"
UINT8 *compgolf_bg_ram;
static tilemap *text_tilem... |
/*
Copyright <2020> <<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, distribute, sublicens... |
/*
* (C) 2001 Clemson University and The University of Chicago
*
* See COPYING in top-level directory.
*/
/* this is a simple test harness that operates on top of the flow
* interface
*/
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include "pvfs2.h"
#include "gossip.h"
#incl... |
#include "meter_arm.h"
#define METER_ARM_W 3
#define METER_ARM_H 80
#define METER_BOX_W 4
#define METER_BOX_H 10
static int angle_bounds;
// The metronome arm drawn as a polygon
const GPathInfo METER_ARM_POINTS = {
// Number of points
8,
// Position of each point
(GPoint []) {{-METER_ARM_W - METER_BO... |
/*
File: device/mouse.c
Contains: driver program for mouse
Auther: <NAME>
Time: 2019/2/12
Copyright: (C) 2018-2019 by BookOS developers. All rights reserved.
E-mail: <EMAIL>
*/
#include <sys/mouse.h>
#include <sys/keyboard.h>
#include <sys/descriptor.h>
#include <sys/memory.h>
#include <sys/clock.h>
#include <sys/... |
/*
* =====================================================================================
*
* Filename: swap.c
*
* Description:
*
* Version: 1.0
* Created: 11/30/2014 04:48:54 PM
* Revision: none
* Compiler: gcc
*
* Author: <NAME> (),
* Organization:
*
... |
/*******************************************************************************
NAME ROBINSON
PURPOSE: Transforms input longitude and latitude to Easting and
Northing for the Robinson projection. The
longitude and latitude must be in radians. The Easting
and Northing values will be... |
/*
** mrb_filestat.c - FileStat class
**
** Copyright (c) <NAME> 2020
**
** See Copyright Notice in LICENSE
*/
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/sysmacros.h>
#include <mruby.h>
#include <mruby/class.h>
#include <mruby/data.h>
#i... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include "pool.h"
#include "repo.h"
#include "chksum.h"
#include "solv_xfopen.h"
#include "repoinfo.h"
#include "mirror.h"
#include "checksig.h"
#include "repoinfo_download.h"
static inline int
... |
/******************************************************************************
* Copyright 2022 ETC 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/l... |
/*
* Testing tool for RSA PKCS #1 v1.5 signature verification
* Copyright (c) 2014, <NAME> <<EMAIL>>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#include "utils/includes.h"
#include "utils/common.h"
#include "crypto/crypto.h"
#include "tls/rsa.h"
#i... |
#include "ite/ite_mac.h"
static struct mii_ioctl_data phy_reg = { CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };
#define phy_set_page(page) do { phy_reg.reg_num=20; phy_reg.val_write=page; iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)
#define phy_reg_write(reg,val) do { phy_reg.reg_num=(reg); phy_reg.val_write=(val);... |
#include "oled.h"
#include "oledfont.h"
uint8_t **Hzk;
void oled_send(uint8_t dc, uint8_t data){
#error Write the i2c send function here.
// for STM32 HAL Lib
// HAL_I2C_Mem_Write(&hi2c1, OLED_ADDR, dc, I2C_MEMADD_SIZE_8BIT, data, 1, 0x100);
}
/// OLED init commands
uint8_t CMD_Data[] = {
0xAE, 0x00, 0x... |
/*
Glowey Core - Copyright (C) 2017..2018 <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 applicabl... |
/*
* Copyright (c) 2015 DeNA Co., Ltd., <NAME>, <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, mod... |
/*-------------------------------------------------------------------------
*
* uriparser.c
* Functions for parsing URI strings
*
* Portions Copyright (c) 2007-2008, Greenplum inc
* Portions Copyright (c) 2012-Present Pivotal Software, Inc.
*
*
* IDENTIFICATION
* src/backend/utils/misc/uriparser.c
*
*... |
#include <stdlib.h>
#include <time.h>
#define BOXES1D 10
#define ALPHA 0.5
#define NUMBER_BOXES BOXES1D * BOXES1D * BOXES1D
#define NUMBER_PAR_PER_BOX 100
#define SPACE_ELEM NUMBER_BOXES * NUMBER_PAR_PER_BOX
#define SPACE_MEM SPACE_ELEM * sizeof(cl_float4)
#define SPACE_MEM2 SPACE_ELEM * sizeof(float)
#define BOX_MEM ... |
/*
* Copyright 2019 <NAME> for CodeWeavers
*
* 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 l... |
#include <string.h>
#include <sys/stat.h>
#include "kernel/calls.h"
#include "kernel/fs.h"
#include "fs/proc.h"
static int proc_lookup(const char *path, struct proc_entry *entry) {
entry->meta = &proc_root;
char component[MAX_NAME + 1] = {};
while (*path != '\0') {
if (!S_ISDIR(proc_entry_mode(entr... |
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2002 <NAME>. All rights reserved.
*
* This software was written by <NAME> <<EMAIL>> for the
* FreeBSD project. Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that the following
* co... |
/* aox.c
*
* Copyright (C) 2003 <NAME> <<EMAIL>>
*
* 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 of the License, or (at your option) any later version.
*
* T... |
/* { dg-do run } */
/* { dg-options "-fno-strict-aliasing" } */
/* { dg-require-effective-target int32plus } */
#include <stdint.h>
#include <stdio.h>
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define av_le2ne32(x) (x)
#else
#define av_le2ne32(x) av_bswap32(x)
#endif
static __attribute__((always_inline)) inline ... |
//
// Created by <NAME>, <NAME> on 2/19/18.
//
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <memory.h>
#include <sys/time.h>
#include "server.h"
#include "client.h"
#define TEST 0
#define OUTPUT 1
#define SIZE 4096
#define SYNCMODE(num) (num == 0 ? "sync" : "async")
#define KEY(num) (num == 0... |
#define _GNU_SOURCE
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
// Vector
typedef struct {
void **data;
int capacity;
int len;
} Vector;
// Map
typedef struct {
Vector *keys;
Vecto... |
/*
This file is part of braid <https://huntprod.com/s/braid>
Copyright 2018 <NAME>, 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 li... |
#pragma once
/*
* voxel map = regions + chunks + ocean + trees + caves + mountains
*/
#include "blocks.h"
#define CHUNK_SIZE 16
#define MAX_SUBCHUNKS 64 // allow chunks populated across 1km (!)
#define CHUNK_SIZE_STR(s) CHUNK_SIZE_STR_2(s)
#define CHUNK_SIZE_STR_2(s) #s
#define VIEW_DISTANCE 16
#define OCEAN_LEV... |
/*
* Simple hash filesystem (SHFS) tools
*
* Authors: <NAME> <<EMAIL>>
*
*
* Copyright (c) 2013-2017, NEC Europe Ltd., NEC 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:
*
... |
static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2;
}
double median(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
}
double q1(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/4)*input->atomSize);
... |
#include <stdio.h>
#define MAXVARS 100
#define xalloc galloc
#define xfree gfree
#ifdef BWGC
#define galloc(n) GC_malloc(n)
#define gstralloc(n) GC_malloc_atomic(n)
#define gfree(n) 0
#else
#define gstralloc malloc
#define galloc malloc
#define gfree free
#endif
#define INTR 1 /* 0: poll, 1: intr */
#ifndef MINIT ... |
/*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "/home/thomas/lwa_ue_working/openair2/X2AP/MESSAGES/ASN1/R11.2/X2AP-IEs.asn"
* `asn1c -gen-PER`
*/
#include "X2ap-FDD-Info.h"
static asn_TYPE_member_t asn_MBR_X2ap_FDD_Info_1[] = {
{ ATF_NOFLAGS, 0, offsetof(st... |
#include "tests.h"
#include "klibc.h"
#include "memory.h"
#include "vm.h"
#define NUM_TESTS 1
int test_vm_1() {
os_printf("asdf\n");
struct vas *vas1 = vm_new_vas();
LOG("Got new vas at 0x%X\n", vas1);
// We're part of the kernel, which is already mapped into vas1.
// But our stack isn't, so let's add that map... |
/*
* Disassembler for PIC17C4x processors.
*
* Copyright (C) 1997-2002 <NAME> <<EMAIL>>
*
* This file is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You can redistribute this file and... |
// Copyright 2018 Schibsted
#include "sbp/etcdclient.h"
#include "sbp/logging.h"
#include "sbp/sd_queue.h"
#include "sbp/create_socket.h"
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
#define REPLY "HTTP/1.0 200 OK\r\n\... |
// Copyright (c) 2013, <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 conditions and... |
/* -*- C -*- */
/*
* Copyright (c) 2012-2020 Seagate Technology LLC and/or its Affiliates
*
* 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... |
/*
* Copyright 2006-2008 The FLWOR Foundation.
*
* 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 o... |
/*
* Created on: 12.12.2012
* Author: Anton
*/
#include "helper.h"
#include <unity.h>
#include <string.h>
// Implemented by modules using this module.
TwiHandlerStatus twi_test_handle_interrupt(TwiStatus status);
byte twea_flag;
#define TEST_ADDRESS 0xaa
TWIDevice testDevice = { TEST_ADDRESS };
byte sendD... |
/*
* dos2unix for BusyBox
*
* dos2unix '\n' convertor 0.5.0
* based on Unix2Dos 0.9.0 by <NAME> (made 19.2.1997)
* Copyright 1997,.. by <NAME> <<EMAIL>>.
* All rights reserved.
*
* dos2unix filters reading input from stdin and writing output to stdout.
* Without arguments it reverts the format (e.i. if sourc... |
/* G L O B E . C
* BRL-CAD
*
* Copyright (c) 2004-2021 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as p... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MOD 1000000007
int counter;
int n,h,max_h,limit,lim_up,lim_down;
int maior;
int mod_abs(int a, int mod) {
return ((a % mod) + mod) % mod;
}
int mod_add(int a, int b, int mod) {
return (mod_abs(a, mod) + mod_abs(b, mod)) % mod;
}
void arcs_fo... |
/*************************************************************************//**
* @file
* @brief This file is part of the AFBR-S50 API.
* @details
*
* @copyright
*
* Copyright (c) 2021, Broadcom Inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modifi... |
/*
* str_or.c
*
* Copyright (c) 2009 <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, me... |
#include <stdio.h>
#include <assert.h>
#include "util.h"
#include "bmat.h"
#include "pnpmat.h"
//------------------------------------------------------------------------
pnpmat pnpmat_erode(pnpmat mat, const int ksize)
{
int i, j; uint64_t neigh;
const int n = pnpmat_nneigh(mat);
pnpmat dst = pnpmat_co... |
/* $Id: mtlk_g35_ccr_decls.h 11899 2011-11-06 09:33:46Z vugenfir $ */
#if !defined(SAFE_PLACE_TO_INCLUDE_MTLK_G35_CCR_DECLS)
#error "You shouldn't include this file directly!"
#endif /* SAFE_PLACE_TO_INCLUDE_MTLK_G35_CCR_DECLS */
#undef SAFE_PLACE_TO_INCLUDE_MTLK_G35_CCR_DECLS
#if defined(MTCFG_PLATFORM_UGW_WAVE400) ... |
#include "system.h"
#include "periphs.h"
#include <iob-uart.h>
#include "iob_timer.h"
#include "iob_knn.h"
#include "random.h" //random generator for bare metal
#include "printf.h"
//uncomment to use rand from C lib
//#define cmwc_rand rand
#ifdef DEBUG //type make DEBUG=1 to print debug info
#define S 12 //random... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <signal.h>
#include <sys/types.h>
int turn_off_signal_recieved = 0;
//error function to print an error message and to finish the execution of the program
//its not necessary at all, ... |
/* GUPDPDRC - Update the PDR when status changes - KeyTech Disk I/O */
#include <string.h>
#include <limits.h>
#include "lli.h"
#include "sysdefs.h"
#include "keyh.h"
#include "queuesh.h"
#include "locksh.h"
#include "spaceh.h"
#include "memomdh.h"
#include "ioreqsh.h"
#include "ioworkh.h"
#include "dskiomdh.h"
#inc... |
/*****************************************************************************
//
// Copyright (c) 2005 Broadcom Corporation
// All Rights Reserved
// No portions of this material may be reproduced in any form without the
// written permission of:
// Broadcom Corporation
// 16215 <NAME>
// ... |
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
#include <time.h>
#include <conio.h>
#include "esparsa.h"
Lista *cria_lista(void){
return NULL;
}
Esparsa *cria_esparsa(int lin, int col){
Esparsa* e = (Esparsa*)malloc(sizeof(Esparsa));
e->linhas = lin;
e->colunas =... |
#include <SDL.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define DU 1.0
#define DV 0.5
#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 800
#define MATRIX_W 200
#define MATRIX_H 200
#define RATIO_X (WINDOW_WIDTH / MATRIX_W)
#define RATIO_Y (WINDOW_HEIGHT / MATRIX_H)
#define get(m, x, y) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.