text stringlengths 3.08k 10.5k |
|---|
/*
* U-boot - main board file
*
* Copyright (c) 2008-2009 Analog Devices Inc.
*
* Licensed under the GPL-2 or later.
*/
#include <common.h>
#include <config.h>
#include <command.h>
#include <net.h>
#include <netdev.h>
#include <spi.h>
#include <asm/blackfin.h>
#include <asm/net.h>
#include <asm/mach-common/bits/... |
#include "common.h"
#include "ec.h"
#include "endianess.h"
#define BITS 384
#define BYTES BITS/8
#define WORDS BITS/64
static void print_64bit_array(uint64_t *x, unsigned len)
{
unsigned i, j;
for (i=0; i<len; i++) {
printf("0x");
for (j=0; j<8; j++) {
printf("%02X", (uint8... |
#include <stdio.h>
#include <unistd.h>
#include "stats.h"
#include "log.h"
#include "memory.h"
#include "driver/device.h"
// number of packets sent simultaneously to our driver
static const uint32_t BATCH_SIZE = 64;
// excluding CRC (offloaded by default)
#define PKT_SIZE 60
static const uint8_t pkt_data[] = {
0x0... |
#include<stdio.h>
#include<stdlib.h>
typedef struct node{
int data;
struct node *left;
struct node *right;
}node;
void insert(node **root, int val){
if(*root == NULL){
*root = (node*)malloc(sizeof(node));
(*root)->data = val;
(*root)->left = NULL;
(*root)->right = NULL;
}
else if(val < (*root)->data){
... |
#include "gridfloat.h"
#include "sort.h"
#include "rtree.h"
#include <stdlib.h>
#include <string.h>
/* Returns the node containing the child that is immediately
above (w.r.t. the given comparator) the given gf_struct.
int gf_rtree_search(gf_struct *gf, gf_rtree_node *root,
int (*cmp)(gf_struct *gf1, gf_stru... |
#include <math.h>
#include "coding.h"
#include "../util.h"
/* Westwood Studios ADPCM */
/* Based on <NAME>'s WS-AUD.txt */
static char WSTable2bit[4]={-2,-1,0,1};
static char WSTable4bit[16]={-9,-8,-6,-5,-4,-3,-2,-1,
0, 1, 2, 3, 4, 5 ,6, 8};
/* We pass in the VGMSTREAM here, unlike in ... |
/*
* Copyright 2008-2014 <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 ... |
/*
* Copyright (c) 2015 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, pu... |
/*
Exercise 8-3. Design and write _flushbuf , fflush , and fclose .
- Based on 8_2
- The K&R code uses buffer for both reading and writing, so we have to flush
them both.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <fcntl.h>
#include <unistd.h>
#define OPEN_MAX 20 /* max #files open at on... |
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 1998-2013. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
/*
* 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 usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
/*
* **************************************************************
* Copyright (c) 2017-2022, <NAME> <<EMAIL>>
* All rights reserved.
*
* This source code is licensed under the BSD-style license found
* in the LICENSE file in the root directory of this source tree.
* ********************************************... |
/* string.h - mDNS library - Public Domain - 2015 <NAME> / Rampant Pixels
*
* This library provides a cross-platform mDNS and DNS-SD library in C based
* on our foundation and network libraries. The implementation is based on RFC 6762
* and RFC 6763.
*
* The latest source code maintained by Rampant Pixels i... |
/** This file is in the public domain.
*
* Basic demonstration using FatFs to access the micro SD card on the
* EXP430F5529.
*
* You'll need to install the FatFs distribution in a subdirectory
* named "fatfs". This implementation has been tested with FatFs
* R0.10 and R0.09b.
*
* @note: If you use a version o... |
/******************************************************************************
* Nome do aluno: <NAME> Numero USP: 3151151 *
* Curso: BCC Data: 11/06/1999 *
* Nome do Professor: <NAME> *
* Exercicio Programa Numer... |
// test the msg2.h implementation.
//
// crazy that the test code is larger than the implementation. and we didn't
// verify!
#include "rpi.h"
#include "msg2.h"
static uint32_t data_val(const void *data, unsigned size) {
uint32_t x = 0;
memcpy(&x, data, size);
return x;
}
static const void *data_ptr(cons... |
#include "cache.h"
#include "pack-revindex.h"
/*
* Pack index for existing packs give us easy access to the offsets into
* corresponding pack file where each object's data starts, but the entries
* do not store the size of the compressed representation (uncompressed
* size is easily available by examining the pack... |
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2010 AT&T Intellectual Property *
* and i... |
/**
******************************************************************************
* File Name : freertos.c
* Description : Code for freertos applications
******************************************************************************
* This notice applies to any and all portions of this file
... |
/*
MIT No Attribution
Copyright (c) 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,... |
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#include <string.h>
// Global parameters
struct setup {
int excel ;
int digit ;
int base ;
int ratio ;
int title ;
int start ;
int end ;
int nDigits ;
int ** sums ;
int ** digits ;
} SU = {
.excel ... |
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "tinn.h"
// Computes error.
static float err( float a, float b)
{
return 0.5f * (a - b) * (a - b);
}
// Returns partial derivative of error function.
static float pderr( float a, float b)
{
return a - b;
}
// Computes to... |
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdio.h>
//Funnction to identify the user
int login(char *username, char *password)
{
//veriables to campare
char uname[500];
char pass[500];
int correct = 0;... |
#include "arch/uart.h"
#include "arch/mmio.h"
/*
* Primary UART(16C650) register map
*/
#define UART0_BASE (MMIO_BASE | 0x201000)
#define UART0_DATA (UART0_BASE + 0x00)
#define RX_DATA (0xFF << 0)
#define DR_FRAME_ERROR (1 << 8)
#define DR_PARITY_ERROR (1 << 9)
#define DR_BREAK_ERROR ... |
/*
* Copyright (c) 2015-2019, Texas Instruments Incorporated
* 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
* n... |
/*
* Test:
* 1. next header = hopbyhop, but no header
* 2. next header = hopbyhop, but invalid length in hopbyhop header
* 3. next header = hophyhop + no_next, but ip6 length longer than claimed
* 4. next header = hophyhop + no_next, but ip6 length shorter than claimed
* 5. 90 extens... |
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* author: <NAME>
*
* Copyright (c) 2006, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Re... |
// Simplified version of mempool.c, that is more oriented towards
// checking that the description of invalid addresses is correct.
#include <stdio.h>
#include <unistd.h>
#include "tests/sys_mman.h"
#include <assert.h>
#include <stdlib.h>
#include "../memcheck.h"
#define SUPERBLOCK_SIZE 100000
#define REDZONE_SIZE ... |
/*
* Copyright (c) 2013-2015 <NAME>
* Copyright 2018 UPLEX - <NAME> Systemoptimierung
*
* Authors: <NAME>
* <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... |
//
// Copyright (c) 2013 <NAME> <EMAIL>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
// Permission is granted to anyone to use this software for any purpose,
// including commer... |
/* SD card and FAT filesystem example.
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#incl... |
// myls.c ... my very own "ls" implementation
#include <stdlib.h>
#include <stdio.h>
#include <bsd/string.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <grp.h>
#include <pwd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <error.h>
#include <errno.h>
#include <dirent.h>
#define MAXD... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#define NAME_MAX 14
typedef struct {
long ino;
char name[NAME_MAX + 1];
} Dirent;
typedef struct {
int fd;
Dirent d;
} MYDIR;
MYDIR *myopendir(char *dirname);
Dirent... |
#include <stdlib.h>
#include <unistd.h>
#include <libgen.h>
#include "../inc/ctrler.h"
#include "../inc/rest.h"
#include "../inc/ini.h"
///////////////////////////////////////////////////////////////////////////////
/// PUBLIC METHODS ///
///////////////////////... |
#pragma once
#include <exception>
// #include <linux/videodev2.h>
#include "ion.h"
#include "meson_ion.h"
#include "IonBuffer.h"
#define AMVIDEOCAP_IOC_MAGIC 'V'
#define CAP_FLAG_AT_CURRENT 0
#define CAP_FLAG_AT_TIME_WINDOW 1
#define CAP_FLAG_AT_END 2
/*
format see linux/ge2d/ge2d.h
like:
GE2D_FORMAT_S24_RGB
*/
... |
#include <stdint.h>
#include <string.h>
#include "nordic_common.h"
#include "nrf.h"
#include "nrf_pwr_mgmt.h"
#include "app_timer.h"
#include "app_util_platform.h"
#include "nrf_log.h"
#include "nrf_drv_clock.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
#include "EPXPlatform_Runtime.h"
#define DE... |
/*
Copyright (C) 2009 Grame
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distribute... |
/*
* This file is part of the bladeRF project:
* http://www.github.com/Nuand/bladeRF
*
* Copyright (c) 2018 Nuand 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 restr... |
// Compile with: clang -std=c99 -Weverything ID3v1Tag.c -o ID3v1Tag
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
static const char * const usage =
"usage: %s FILE_NAME [-h] [-t TITLE] [-a ARTIST] [-A ALBUM] [-y YEAR]\n\
[-c COMMENT] [-n TRACK]... |
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <stdbool.h>
#include <signal.h>
#include <sys/mman.h>
#include <unistd.h>
#include "forth/forth_embed.h"
// if the region requested is already mapped, things fail
// so we want address that won't get used as the program
// starts up
#define STACKHEAP_M... |
typedef struct Conf Conf;
typedef struct Dma Dma;
typedef struct FPU FPU;
typedef struct FPenv FPenv;
typedef struct Label Label;
typedef struct Lock Lock;
typedef struct Mach Mach;
typedef struct Ureg Ureg;
typedef struct ISAConf ISAConf;
typedef struct PCMconftab PCMconftab;
typedef struct PCMmap PCMmap;
typedef stru... |
#define PONG_STATE_WAITING_FIRST_STRIKE 10
#define PONG_STATE_BALL_MIDAIR 20
#define PONG_STATE_AWAIT_REPLY_STRIKE 30
#define PONG_STATE_FAILURE 40
//#define PONG_STATE_ 20
//#define PONG_STATE_ 20
//#define PONG_MIDAIR_BALL_INTERVAL 250
#define PONG_REPLY_TIMEOUT 250
int pongState = PONG_STATE_WAITING_FIRST_STRIKE;
i... |
/*lirary-index*/
#include<sys/socket.h>
#include<netinet/in.h>
#include<pthread.h> //thread 這行必定要加請同學要注意
#include<arpa/inet.h>
#include<ctype.h>
#include<string.h>
#include <stdio.h>
#include <unistd.h>
/*define-index*/
#define chatMemberSIZE 4
/*Functions-index*/
void *connection_handler(void*);
void show(int List[]... |
/*
*
* 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"); y... |
/*
* LTE NB1 ML1 GM PDSCH STAT Ind
*/
#include "consts.h"
#include "log_packet.h"
#include "log_packet_helper.h"
const Fmt LteNb1Ml1GmPdschStatIndFmt[] = {
{UINT, "Version", 1},
{SKIP, NULL, 2}, //Reserved
};
const Fmt LteNb1Ml1GmPdschStatIndFmt_v2[] = {
{UINT, "Num of Records", 1},
};
const Fmt LteN... |
/*-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Project 6
File: ListFunctions.h
Created by: <NAME>
Last edit on: 11/21/2013 (Fritts)
Description: A list of functions for adding, deleteing, searching, and
replacing data in linked lists.
Da... |
/******************************************************************************
*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
* GPL LICENSE SUMMARY
*
* Copyright(c) 2015 Intel Mobile Communications GmbH
*
* This progra... |
/* -----------------------------------------------------------------------------
* syn-intel.c
*
* Copyright (c) 2002, 2003, 2004 <NAME> <<EMAIL>>
* All rights reserved. See (LICENSE)
* -----------------------------------------------------------------------------
*/
#include "types.h"
#include "extern.h"
#includ... |
/*******************************************************/
/* file: lenval.c */
/* abstract: This file contains routines for using */
/* the lenVal data structure. */
/*******************************************************/
#include "lenval.h"
#include "... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <omp.h>
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define MAXCAD 100
#define NUM_PASOS 5
#define DIST_RADIO 8
#define IMAGEN_ENTRADA "Lenna.ppm"
#define IMAGEN_SALIDA "lenna-fil.ppm"
struct pixel {
unsigne... |
#include "modules/api.h"
#include "gaussian_elimination.h"
// TODO ROI
void modify_roi_in(
dt_graph_t *graph,
dt_module_t *module)
{
// TODO: set smooth flag on input connector only if we have any distortion parameter set
module->connector[0].flags = s_conn_smooth;
const float *p_crop = dt_module_param_f... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "WordTable.h"
#define isLetter(char) ((char>='A'&&char<='Z')||(char>='a'&&char<='z'))
// Initializes a word table
void wtable_init(WordTable * wtable)
{
// Allocate and initialize space for the table
wtable->nWords = 0;
wtable->maxWords = 10;
w... |
/**************************************************************
* Copyright (c) Modelica Association Project "FMI". *
* All rights reserved. *
* This file is part of the Reference FMUs. See LICENSE.txt *
* in the project root for license information. *
... |
/*
** AACDecoder - Freeware Advanced Audio (AAC) Decoder for Android
** Copyright (C) 2011 Spolecne s.r.o., http://www.spoledge.com
**
** This file is a part of AACDecoder.
**
** AACDecoder is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as publis... |
#include "helper.h"
#include "visual.h"
#include <stdio.h>
double getValidValue(double v){
if( isnan(v)){//check for NaN
return -1;
}
else if(isinf(v)){//check for Infinity
return -2;
}
else{
return v;
}
}
void write_vtkFile(const char *szProblem,
int timeStepNumber,
double xlength,
double ylen... |
/*
* This file is part of the Visual Computing Library (VCL) release under the
* MIT license.
*
* Copyright (c) 2014 <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 r... |
/*
* 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... |
/*
* Copyright 2019, Cypress Semiconductor Corporation or a subsidiary of
* Cypress Semiconductor Corporation. All Rights Reserved.
*
* This software, including source code, documentation and related
* materials ("Software"), is owned by Cypress Semiconductor Corporation
* or one of its subsidiaries ("Cypress") a... |
#include <stdio.h>
#include <string.h>
#include "nano-X.h"
#include "nxcolors.h"
#define TEST_COPYAREA 1
#define TEST_XOR_VHLINE 0
//#define FONT "DejaVuSans-Bold.ttf"
#define FONT "arial.ttf"
//#define IMAGE "images/demos/nanox/tux.gif"
#define IMAGE "images/demos/nanox/alphademo.png"
//#define IMAGE "images/... |
/* packet-qllc.c
* Routines for QLLC protocol - Qualified? LLC
* <NAME> <<EMAIL>>
*
* Wireshark - Network traffic analyzer
* By <NAME> <<EMAIL>>
* Copyright 2001 <NAME>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as publishe... |
#include <ansi.h>
#include <combat.h>
#define DANG "「" HIW "神威浩荡" NOR "」"
inherit F_SSERVER;
int perform(object me, object target)
{
object weapon, cloth;
int ap, dp, damage, wp, cl;
string msg;
if (userp(me) && ! me->query("can_perform/xiantian-gong/dang"))
return no... |
/*
* Copyright 2020 Makani Technologies 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 ... |
#include <stdio.h>
#include "ops.h"
#ifndef commonConstants
#define commonConstants
#define STRINGT 0
#define INTT 1
#define FLOATT 2
#define BOOLT 3
#define TCOUNT 3
#define SUMA 0
#define REST 1
#define MULT 2
#define DIVIS 3
#define ANDOP 4
#define OROP 5
#define EQUAL 0
#define GREAT 1
#define LESS 2
#define ... |
/******************************************************************************
*
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Softw... |
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <pthread.h>
#include <inttypes.h>
#include <string.h>
#include <assert.h>
#include "erldp.h"
static uint64_t next_random(uint64_t x);
static pthread_mutex_t output_lock;
int test_seed(uint64_t seed, const char *cookie, size_t size,
char *derived) ... |
/*
* eagle-owl application.
*
* Copyright (C) 2012 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later ver... |
/*
*
* Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com
*
* The contents of this file are provided under the Software License
* Agreement that you accepted before downloading this file.
*
* This source forms part of the Software and can be used for educational,
* training, and demonstration purpos... |
// <NAME> 10/11/12
// e.g. ./swt_word_detect img.jpg
// ./swt_word_detect -i img.jpg
//clang swtdetect.c -L"/Users/jaderberg/Work/Utils/ccv_max/lib" -I"/Users/jaderberg/Work/Utils/ccv_max/lib" -lccv -o swt_word_detect `cat /Users/jaderberg/Work/Utils/ccv_max/lib/.LN` -lm
#include "ccv.h"
#include <sys/time.h>
#inclu... |
/*-------------------------------------------------------------------------
*
* bernoulli.c
* interface routines for BERNOULLI tablesample method
*
* Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
*
* IDENTIFICATION
* src/backend/utils/tablesample/bernoulli.c
*
*--------------------... |
// Copyright 2021 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... |
#include "osxkeychain_darwin.h"
#include <CoreFoundation/CoreFoundation.h>
#include <Foundation/NSValue.h>
#include <stdio.h>
#include <string.h>
char *get_error(OSStatus status) {
char *buf = malloc(128);
CFStringRef str = SecCopyErrorMessageString(status, NULL);
int success = CFStringGetCString(str, buf, 128, ... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus - assemble.c *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Copyright (C) 2002 Hacktarux *
* ... |
/*
Copyright (c) 2015-2018, Cisco International Ltd
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... |
/* ---------------------------------------------------------------------
Student: <NAME> - hickmanjv
Student ID: 10236503
Assignment: Homework 1
Homework1.c - Creating a program to read data from 3 different input
files that contain baseball player stats used to calculate
slugging percentage, then sorting t... |
/*
Name: randprime.c
Purpose: Generate a probable prime at random.
Author: <NAME>
Usage: randprime [-s] <bits> [<outfile>]
Generate a randomly-chosen probable prime having <bits> significant bits, and
write it to the specified output file or to the standard output. If the "-s"
option is given, ... |
/* -*- C -*-
* Copyright (c) 1998-2006 <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... |
#include <user_interface.h>
SDL_Surface *hp_bar = NULL;
SDL_Surface *mp_bar = NULL;
SDL_Surface *empty_bar = NULL;
SDL_Surface *skill_frame = NULL;
TTF_Font *interface_font = NULL;
static const SDL_Color interface_font_color = {255, 255, 255};
int load_user_interface()
{
if((hp_bar = load_image("gui/red.png")) ==... |
/* Copyright (c) 2015, Freescale Semiconductor, 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:
* * Redistributions of source code must retain the above copyright
* notice, th... |
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "mpi.h"
#define TOTAL_ARRAYS 10000
#define TOTAL_NUMBERS 100000
#define MAX_NUMBER TOTAL_ARRAYS * TOTAL_NUMBERS
#define MASTER 0
#define TAG_DIE TOTAL_ARRAYS + 1
#define NUM_THREADS 8
#define T_NUMBER int
#define T_MPI_TYPE M... |
#include "cplp.h"
/* Creates a representation of a CPLEX LP where
* nrows -> number of constraints
* ncols -> number of variables
* non_zero -> number of non-zero entries in the LP
* def_sense -> default sense of each constraint
*/
cplp_t *create_cplp(int nrows, int ncols, int non_zero, char def_sense)
{
int ... |
#include "structs.h"
#include "estoque.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
void listarEstoque(Produtos* produtosDisponiveis, int* contadorProdutos) {
for( int i = 0; i < (*contadorProdutos); i++) { //lista os produtos disponiveis no estoque
if(produtosDisponi... |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct item {
int value;
struct item *next_item;
} Item;
Item * init_list(Item *);
Item * append_item(Item *, Item *);
Item * prepend_item(Item *, Item *);
Item * allocate_item(void);
Item * insert_item(Item *, Item *, int);
Item * delete_item(Ite... |
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#define MMAP_PATH "/dev/mem"
enum {
MUX_GPIO = 0,
MUX_SPI_S,
MUX_SPI_CS1,
MUX_I2S,
MUX_UART0,
MUX_I2C,
MUX_UART1,
MUX_UART... |
//=============================================================================
// Copyright 2018 <NAME> (rm5248)
// Copyright 2020 <NAME> (Nelson)
//
// 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 L... |
#include <stdio.h>
//#include <SDL.h>
//#include <SDL2_gfxPrimitives.h>
//#include "audio/audio.h"
#include "primlib.h"
/*
static SDL_Window *sdlWindow;
static SDL_Renderer *sdlRenderer;
*/
#if defined (__PS4__)
#include <debugnet.h>
#endif
/*
typedef struct
{
float x;
float y;
} SDL_FPoint;
typedef struct... |
#pragma once
/* appmanager.h
* Routines for managing the loading of applications dynamically
* Each app is loaded with its own stack and heap.
* (https://github.com/pebble-dev)
* RebbleOS
*
* Author: <NAME> <<EMAIL>>.
*/
#include "rebble_time.h"
#include "fs.h"
#include "FreeRTOS.h"
#include "task.h"
#includ... |
#include <idt.h>
#include <stdio.h>
#include <thread.h>
#include <mm.h>
#include <storage.h>
#include <string.h>
#include <stdlib.h>
#include <io.h>
#include <data.h>
#include <gui.h>
#include <socket.h>
#define SYSCALL_TABLE 17
unsigned long ret;
extern unsigned long server_id[6];
extern PAINT *paint_ready_qu... |
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <math.h>
typedef struct {
int64_t max_values;
long double sum;
int64_t count;
long double current;
long double values[0];
} ma_t;
long double moving_a... |
#include <stdint.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <openssl/sha.h>
#include "types.h"
#ifdef _WIN32
#define LL "I64"
#else
#define LL "ll"
#endif
u8 sha256[0x20]={0};
u8 ID0[0x10]={0};
u8 part2[0x20]={0};
u8 msed[0x140]={... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct node {
char* data;
int key;
struct node *next;
} node_t;
typedef struct list {
struct node *head;
int length;
} list_t;
//init Linklist
list_t* initList() {
list_t* ret = malloc(sizeof(list_t));
ret->head = NULL;
ret->length = 0;
retu... |
#define __APPLE_USE_RFC_3542 // For MacOSX, maybe not required
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
void
forward_response(int sock_fd, unsigned char *buf, int len, struct sockaddr_in *dest,
struct in_... |
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
*/
#include <linux/string.h>
#include <linux/nls.h>
#include "exfat.h"
static u16 bad_uni_chars[] = {
/* " * / : < > ? \ | */
0x0022, 0x002A, 0x002F, 0x003A,
0x003C, 0x003E, 0x003F, 0x005C, 0x007C,
0... |
#include <net-snmp/net-snmp-config.h>
#if HAVE_STRING_H
#include <string.h>
#else
#include <strings.h>
#endif
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/agent/row_merge.h>
#if HAVE_DMALLOC_H
#include <dmalloc.h>
#endif
/** @defgroup row_merge row_... |
#include "sgui.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
static void fail( const char* message )
{
fputs( message, stderr );
exit( EXIT_FAILURE );
}
#define BADPTR ((void*)0xC0FEBABE)
static void add_items( sgui_model* model, sgui_item* parent, int level,
int wi... |
/******************************************************************************
* @file main.c
* @version V1.00
* $Revision: 9 $
* $Date: 14/05/30 5:59p $
* @brief Demonstrate the usage of Ethernet time stamp function.
* It sets current time to 1000 second and prints out
* curr... |
#define CL_TARGET_OPENCL_VERSION 220
#include <CL/cl.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#define CHECK(functionName, ...) validate(__FILE__, __LINE__, #functionName, functionName(__VA_ARGS__))
#define CHECK_CODE(functionName, errorCode) validate(__FILE__, __LINE__, #function... |
/*
* Copyright (C) 2007 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
*
* Unless required by app... |
/*
Trabalho I: em dupla.
Dada as funções da classe abaixo implemente-as no paradigmas
imperativo, como do programa acima; não use recursividade,
caminhe na lista com comandos iterativos;
programe o imprimir lista, com esta saida: [1,3,4,5,7,9];
depois responda as perguntas abaixo.
antes de cada uma destas pergunt... |
/*
* CPCLIB
*
* Copyright (C) 2000-2008 EMS Dr. <NAME>
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#include <string.h>
#include <fcntl.h>
#include "socketcan.h"
... |
/**
Copyright (C) 2003-2004 <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,
modif... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.