repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
PHSI-supplements/textbook-code | chap09/lecture-examples/syscall_demo.c | #include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
write(1, "Before fork.\n", 13);
int pid = 0;
fork();
pid = getpid();
printf("PID = %d\n", pid);
}
|
PHSI-supplements/textbook-code | chap01/never_zero.c | <reponame>PHSI-supplements/textbook-code
/*
* is_zero.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
void is_zero(int x);
int main() {
is_zero(1);
is_zero(0);
}
void is_zero(int x) {
printf("x is %d\n", x);
if (x=0) printf("x is zero\n");
else printf("x is not zero\n");
}
|
PHSI-supplements/textbook-code | chap10/print_addresses.c | #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "UnusedValue"
#pragma ide diagnostic ignored "UnusedLocalVariable"
#pragma clang diagnostic ignored "-Wreturn-stack-address"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
/*
* print_... |
PHSI-supplements/textbook-code | chap05/arithmetic.c | #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "cppcoreguidelines-narrowing-conversions"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
#pragma ide diagnostic ignored "readability-non-const-parameter"
/*
* arithmetic.c (c) 2018-2... |
PHSI-supplements/textbook-code | chap07/degrees_of_parallelizable.c | <filename>chap07/degrees_of_parallelizable.c
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
#pragma ide diagnostic ignored "bugprone-branch-clone"
#pragma ide diagnostic ignored "misc-no-recursion"
/*
* degrees_of_... |
PHSI-supplements/textbook-code | chap01/pre_post_increment.c | <gh_stars>1-10
/*
* pre_post_increment.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
void post_increment() {
int primes[] = {2, 3, 5, 7, 11, 13};
int i=0;
int p=primes[i++];
printf("p==%d i==%d\n", p, i);
}
void pre_increment() {
int primes[] = {2, 3, 5, 7, 11, 13};
int i=0;
int p=primes[+... |
PHSI-supplements/textbook-code | chap07/thread_demo.c | /*
* thread_demo.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#pragma ide diagnostic ignored "UnusedLocalVariable"
#pragma ide di... |
PHSI-supplements/textbook-code | chap01/hello1.c | <gh_stars>1-10
/*
* hello1.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
int main(void) {
printf("Hello World.\n");
return 0;
}
|
PHSI-supplements/textbook-code | chap03/iterate_over_alphabet.c | <gh_stars>1-10
/*
* iterate_over_alphabet.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
int main() {
printf("Iterating over the lower-case letters...\n");
for (char c='a'; c<='z'; c++)
printf("%c ", c);
printf("\n");
}
|
PHSI-supplements/textbook-code | chap01/examine_bits.c | /*
* examine_bits.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
void examine_bits(short x) {
if (x & 0x1)
printf("%d is odd.\n", x);
else
printf("%d is even.\n", x);
if (!x)
printf("%d is zero.\n", x);
// else if (x & 0x8000) // this is clearer
else i... |
PHSI-supplements/textbook-code | chap01/enum_examples.c | <reponame>PHSI-supplements/textbook-code
/*
* enum_examples.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include "enum_examples.h"
int main() {
enum days day = WEDNESDAY;
printf("%d\n", day);
char suitString[9] = "";
suits s = HEARTS;
printf("%s\n", print_suit(s, suitString));
}
char *print_sui... |
PHSI-supplements/textbook-code | chap06/structured_programming.c | /*
* structured_programming.c (c) 2018-20 <NAME>
*/
#include <stdbool.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
long ifonly (long x) {
long y = 3;
if (x>3)
y=x+3;
return x+y;
}
long... |
PHSI-supplements/textbook-code | chap06/lecture-examples.c | /*
* chap06/lecture-examples.c (c) 2021 <NAME>
*/
void traverse_array(int *values, int number_of_values) {
for (int i = 0; i < number_of_values; i++)
values[i]++;
}
void traverse_array_with_pointers(int *values, int number_of_values) {
int *end = values + number_of_values;
do {
(*values)... |
PHSI-supplements/textbook-code | chap07/atomic_interleaving.c | /*
* atomic_interleaving.c (c) 2018-21 <NAME>
*/
#include <stdio.h>
#include <stdatomic.h>
#include <pthread.h>
const int number_of_pairs = 2;
const int number_of_iterations = 1000000;
pthread_mutex_t mutex;
int nonatomic_shared_variable;
int mutex_shared_variable;
atomic_int atomic_shared_variable;
void *incremen... |
PHSI-supplements/textbook-code | chap02/watermark_demo.c | /*
* watermark_demo.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
int p[] = {1818576905, 539783020, 1819438935, 663908};
int main() {
printf("%s", (char *)p);
}
|
PHSI-supplements/textbook-code | chap07/fork_demo.c | /*
* fork_demo.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdbool.h>
#include <memory.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclara... |
PHSI-supplements/textbook-code | chap01/hello.h | <reponame>PHSI-supplements/textbook-code
void display_sentence();
|
PHSI-supplements/textbook-code | chap11/hex2raw.c | <reponame>PHSI-supplements/textbook-code<filename>chap11/hex2raw.c
/*
* hex2raw.c (c) 2021 <NAME>
*/
#include <ctype.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
void simple_hex2raw() {
int hex;
int scan_return;
while (((scan_return = scanf("%x", &hex)) != EOF) &&... |
PHSI-supplements/textbook-code | chap01/enum_examples.h | <reponame>PHSI-supplements/textbook-code
/*
* enum_examples.h (c) 2018-20 <NAME>
*/
#ifndef TEXTBOOK_CODE_ENUM_EXAMPLES_H
#define TEXTBOOK_CODE_ENUM_EXAMPLES_H
enum days {
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY
};
typedef enum {
CLUBS, DIAMONDS, HEARTS, SPADE... |
PHSI-supplements/textbook-code | chap11/rop-victim.c | <gh_stars>1-10
/*
* rop-victim.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
void buffer_too_small();
void caller();
int four(int arg1, int arg2);
int main() {
caller();
}
void caller() {
buffer_too_small();
printf("Returned to caller. Booooring.\n");
}
int two() {
return 2;
}
int three(int arg1,... |
PHSI-supplements/textbook-code | chap05/mov.c | #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
#pragma clang diagnostic ignored "-Wuninitialized"
#pragma ide diagnostic ignored "readability-non-const-parameter"
/*
* mov.c (c) 2018-20 <NAME>
*/
long mov_demo1... |
PHSI-supplements/textbook-code | chap09/catchall.c | <gh_stars>1-10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "EndlessLoop"
#pragma ide diagnostic ignored "UnusedLocalVariable"
/*
* catchall.c (c) 2018-20 <NAME>
*/
// Need to expose Single UNIX Speccification definitions, including sigset
#define ... |
PHSI-supplements/textbook-code | chap06/memory_layout.c | #include <stdio.h>
#include <stdlib.h>
long global_variable = 73;
void print_stack_address(const long *addr) {
long new_addr = 42;
if (addr) {
printf(" First called stack frame at %14p\n", addr);
printf(" Second called stack frame at %14p\n", &new_addr);
} else {
print_sta... |
PHSI-supplements/textbook-code | chap03/casting.c | <gh_stars>1-10
/*
* casting.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
void cast_to_larger_type(short x);
void cast_to_smaller_type(int x);
void cast_implicitly_to_unsigned(int x, unsigned int y);
void cast_int_to_float(int i);
void cast_float_to_int(float f);
int main() {
cast_to_larger_type(0x4E95);
cast... |
PHSI-supplements/textbook-code | chap06/indirect_result.c | <filename>chap06/indirect_result.c<gh_stars>1-10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "UnusedValue"
#pragma ide diagnostic ignored "UnusedLocalVariable"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
/*
* indirect_resul... |
PHSI-supplements/textbook-code | chap04/nonterminating_loop.c | /*
* nonterminating_loop.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <unistd.h>
#define MS_PER_uS 1000
int main() {
float x;
int duration = 100 * MS_PER_uS;
for (x = 0.0; x != 10.0; x += 0.1) {
printf("x = %f\n", x);
usleep(duration);
}
}
|
PHSI-supplements/textbook-code | chap11/buffer-too-small.c | /*
* buffer_too_small.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
void buffer_too_small();
void caller();
int main() {
caller();
}
void caller() { buffer_too_small(); }
void buffer_too_small() {
puts("Enter a string:");
char buffer[8]; // too small
gets(buffer);
puts(buffer);
}
|
PHSI-supplements/textbook-code | chap07/dining_philosophers.c | /*
* dining_philosophers.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <pthread.h>
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "cert-msc50-cpp"
#pragma ide diagnostic ignored "Unu... |
PHSI-supplements/textbook-code | chap01/struct_examples.c | <filename>chap01/struct_examples.c
/*
* struct_examples.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include "enum_examples.h"
struct hat {
int size;
char *color;
};
typedef enum days day;
typedef struct hat headwear;
typedef struct {
int value;
suits suit;
} card;
void displayHat( struct hat *the... |
PHSI-supplements/textbook-code | chap11/has-target.c | /*
* has-target.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <stdlib.h>
void buffer_too_small();
void caller();
int main() {
caller();
}
void caller() {
buffer_too_small();
printf("Returned to caller. Booooring.\n");
}
void not_caller() {
printf("Did not return to caller! (insert maniacal... |
PHSI-supplements/textbook-code | chap02/endian_test.c | <filename>chap02/endian_test.c
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat"
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "UnreachableCode"
/*
* endian_test.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <stdint.h>
int main() {
uint64_t son... |
PHSI-supplements/textbook-code | chap03/show_limits.c | /*
* show_limits.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <limits.h>
#include <float.h>
int main() {
printf("Information from limits.h, float.h and sizeof():\n");
printf("There are %d bits in a char.\n", CHAR_BIT);
printf("There are %d bits in an int.\n", WORD_BIT);
printf("There are %ld ... |
PHSI-supplements/textbook-code | chap06/arrays.c | /*
* arrays.c (c) 2018-20 <NAME>
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
int *get_address(int *foo, long j) {
return &foo[j];
}
int get_value(int *foo, long j) {
return foo[j];
}
long nested_... |
PHSI-supplements/textbook-code | chap07/lecture-examples.c | /*
* chap07/lecture-examples.c (c) 2021 <NAME>
*/
#include <stdio.h>
#include <unistd.h>
void orphan_demo();
void orphan_demo() {
if (fork()) {
printf("Parent process (%d) terminating.\n", getpid());
} else {
printf("Child process (%d) running.\n", getpid());
while(1);
}
}
int ... |
PHSI-supplements/textbook-code | chap06/struct_alignment.c | <gh_stars>1-10
/*
* struct_alignment.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
struct hat1 {
char *brand;
int size;
char *color;
};
struct hat2 {
char *brand;
short inspected_by;
int size;
char *color;
};
struct hat3 {
char *brand;
int size;
char *color;
short inspecte... |
PHSI-supplements/textbook-code | chap11/notional_gets.c | <gh_stars>1-10
/*
* notional_gets.c (c) 2021 <NAME>
*/
#include <stdio.h>
/* gets: read newline-terminated string from stdin into s.
* This simple implementation does not handle errors. */
char *my_gets(char *s) {
int c;
char *p = s;
while (((c = getchar()) != EOF) && (c != '\n')) {
*p++ = c;
... |
PHSI-supplements/textbook-code | chap01/hello3.c | /*
* hello3.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
void display_sentence();
int main(void) {
display_sentence();
return 0;
}
void display_sentence() {
printf("Hello World.\n");
}
|
PHSI-supplements/textbook-code | chap01/dont_use_break.c | <filename>chap01/dont_use_break.c
/*
* dont_use_break.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
/* Code from K&R, The C Programming Language, 2nd ed., page 65. I do not claim copyright on it (obviously). */
int trim1(char s[]) {
int n;
for (n = (... |
PHSI-supplements/textbook-code | chap05/lecture-examples.c | /*
* chap05/lecture-examples.c (c) 2021 <NAME>
*/
long add_two_numbers(long a, long b);
void add_and_save(long x, long y, long *destination) {
long z = add_two_numbers(x, y);
*destination = z;
}
int demonstrate_suffixes() {
char c = 1+2;
short s = 3+4;
int i = 5+6;
long l = 7+8;
}
int demo... |
PHSI-supplements/textbook-code | chap01/switch_example.c | /*
* switch_example.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <stdlib.h>
void using_switch(int value) {
switch (value) {
case 1:
printf("One\n");
break;
case 2:
printf("Two\n");
// fall through
case 3:
printf("Or maybe... |
PHSI-supplements/textbook-code | chap12/code_migration.c | #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
/*
* code_migration.c (c) 2018-20 <NAME>
*/
#include <string.h>
/*
void average_neighbors1(const double *matrix, int width, int height) {
// doesn't actually wo... |
PHSI-supplements/textbook-code | chap10/loopIndexing.c | <filename>chap10/loopIndexing.c
/*
* loopindexing.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <time.h>
#define RANGE 16384
int src1[RANGE][RANGE];
int src2[RANGE][RANGE];
int dest[RANGE][RANGE];
int main() {
clock_t start1, finish1, start2, finish2;
int i, j;
for (i = 0; i < RANGE; i++)
... |
PHSI-supplements/textbook-code | chap11/accidental_overflow.c | <reponame>PHSI-supplements/textbook-code<gh_stars>1-10
/*
* accidental_overflow.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <string.h>
/* more readable strcpy: copy t to s */
void readable_strcpy(char *s, const char *t) {
char c;
long i = 0;
do {
c = t[i];
s[i] = c;
i++;
... |
PHSI-supplements/textbook-code | chap12/alias_and_unrolling.c | #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "UnusedLocalVariable"
#pragma ide diagnostic ignored "UnusedValue"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
/*
* alias_and_unrolling.c (c) 2018-20 <NAME>
*/
#include <stdio.h>... |
PHSI-supplements/textbook-code | chap06/2darray.c | /**
* 2darray.c (c) 2018-20 <NAME>
*
* Nested Array Problem Generator
*
* 1. Edit to set the values of M and N for the problem
* 2. Compile with gcc -Og -S 2darray.c
* 3. Extract foo's assembly code from 2darray.s
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide... |
mulle-objc/mulle-objc-runtime | test-startup/methods/inheritance/test_category_inheritance.c | <reponame>mulle-objc/mulle-objc-runtime<gh_stars>100-1000
//
// test_category_inheritance.c
// mulle-objc-runtime
//
// Created by Nat! on 10.03.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include <mulle-objc-runtime/mulle-objc-runtime.h>
#include "test_runtime_ids.h"
#include "test_simple_inheritan... |
mulle-objc/mulle-objc-runtime | test/hash/uniqueid/uniqueid.c | <reponame>mulle-objc/mulle-objc-runtime<gh_stars>100-1000
//
// main.m
// test-md5
//
// Created by Nat! on 26.02.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef __MULLE_OBJC__
# define __MULLE_OBJC_NO_TPS__
# define __MULLE_OBJC_FCS__
#endif
#include <mulle-objc-runtime/mulle-objc-runtime.h>
i... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-universe-class.c | //
// mulle_objc_class_universe.c
// mulle-objc-runtime
//
// Created by Nat! on 10.07.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the fol... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-callqueue.h | <filename>src/mulle-objc-callqueue.h<gh_stars>100-1000
//
// mulle_objc_callqueue.h
// mulle-objc-runtime
//
// Created by Nat! on 20/11/14.
// Copyright (c) 2014 Nat! - <NAME>.
// Copyright (c) 2014 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// ... |
mulle-objc/mulle-objc-runtime | test/demo/demo2.c | //
// main.m
// test-runtime-3
//
// Created by Nat! on 04.03.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef __MULLE_OBJC__
# define __MULLE_OBJC_NO_TPS__
# define __MULLE_OBJC_FCS__
#endif
#include <mulle-objc-runtime/mulle-objc-runtime.h>
#include <mulle-objc-runtime/mulle-objc-dotdump.h>
#inc... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-universe.h | //
// mulle_objc_universe.h
// mulle-objc-runtime
//
// Created by Nat! on 16/11/14.
// Copyright (c) 2014 Nat! - <NAME>.
// Copyright (c) 2014 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-uniqueid/main.c | //
// main.c
// mulle-objc-runtime-uniqueid
//
// Created by Nat! on 19.04.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following condi... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-fastmethodtable.h | //
// mulle_objc_fast_call.h
// mulle-objc-runtime
//
// Created by Nat! on 26/10/15.
// Copyright (c) 2015 Nat! - <NAME>.
// Copyright (c) 2015 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the followin... |
mulle-objc/mulle-objc-runtime | test-compiler-runtime/0_runtime/load-categories/Base.h | <filename>test-compiler-runtime/0_runtime/load-categories/Base.h
#import "Root.h"
@interface Base : Root
@end
|
mulle-objc/mulle-objc-runtime | test-debugger/20_gdb/simulate-gdb/defs.h | <filename>test-debugger/20_gdb/simulate-gdb/defs.h
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <mulle-dlfcn/mulle-dlfcn.h>
typedef uint64_t CORE_ADDR;
typedef uint64_t ULONGEST;
struct minimal_symbol;
struct objfile;
struct bound_minimal_symbol
{
CO... |
mulle-objc/mulle-objc-runtime | test-compiler-runtime/0_runtime/load-classes/Proto1.h | #include <mulle-objc-runtime/mulle-objc-runtime.h>
@protocol Proto1
@end
|
mulle-objc/mulle-objc-runtime | src/mulle-objc-cache.c | //
// mulle_objc_cache.c
// mulle-objc-runtime
//
// Created by Nat! on 15.09.15.
// Copyright (c) 2015 Nat! - <NAME>.
// Copyright (c) 2015 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following co... |
mulle-objc/mulle-objc-runtime | test-compiler-runtime/0_runtime/load-classes/Foo3.h | <filename>test-compiler-runtime/0_runtime/load-classes/Foo3.h
#import "Base.h"
@class ProtoClass1;
@protocol ProtoClass1;
@class ProtoClass2;
@protocol ProtoClass2;
@interface Foo3 : Base < ProtoClass1, ProtoClass2>
@end
|
mulle-objc/mulle-objc-runtime | src/mulle-objc-metaclass.h | <reponame>mulle-objc/mulle-objc-runtime<filename>src/mulle-objc-metaclass.h
//
// mulle_objc_metaclass.h
// mulle-objc-runtime
//
// Created by Nat! on 17/04/07
// Copyright (c) 2017 Nat! - <NAME>.
// Copyright (c) 2017 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms,... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-uniqueidarray.c | //
// mulle_objc_uniqueidarray.c
// mulle-objc-runtime-universe
//
// Created by Nat! on 28.05.17
// Copyright (c) 2017 Nat! - <NAME>.
// Copyright (c) 2017 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that ... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-universe-struct.h | <filename>src/mulle-objc-universe-struct.h
//
// mulle_objc_universe_struct.h
// mulle-objc-runtime
//
// Created by Nat! on 16/11/14.
// Copyright (c) 2014 Nat! - <NAME>.
// Copyright (c) 2014 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modif... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-propertylist.c | <reponame>mulle-objc/mulle-objc-runtime<filename>src/mulle-objc-propertylist.c
//
// mulle_objc_propertylist.c
// mulle-objc-runtime
//
// Created by Nat! on 23.01.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary... |
mulle-objc/mulle-objc-runtime | test/c/struct/call.c | //
// main.c
// mulle-msg-send
//
// Created by Nat! on 15/11/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#include <stdio.h>
struct _foo
{
int a, b;
};
void print_foo( struct _foo *_par)
{
printf( "%d%d\n", _par->a, _par->b);
}
struct _baz
{
struct _foo x;
int a, b;
};
... |
mulle-objc/mulle-objc-runtime | src/reflect/_mulle-objc-runtime-include.h | <filename>src/reflect/_mulle-objc-runtime-include.h<gh_stars>100-1000
/*
* This file will be regenerated by `mulle-sourcetree-to-c` via
* `mulle-sde reflect` and any edits will be lost.
* Suppress generation of this file with:
*
* mulle-sde environment set MULLE_SOURCETREE_TO_C_INCLUDE_FILE DISABLE
*
... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-cache.h | <gh_stars>100-1000
//
// mulle_objc_cache.h
// mulle-objc-runtime
//
// Created by Nat! on 15.09.15.
// Copyright (c) 2015 Nat! - <NAME>.
// Copyright (c) 2015 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided th... |
mulle-objc/mulle-objc-runtime | test-startup/methods/inheritance/test_message_sending.c | //
// test_message_sending.c
// mulle-objc-runtime
//
// Created by Nat! on 13.03.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include <mulle-objc-runtime/mulle-objc-runtime.h>
#include "test_runtime_ids.h"
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
//
// this doesn't check inherita... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-ivar.h | <gh_stars>100-1000
//
// mulle_objc_ivar.h
// mulle-objc-runtime
//
// Created by Nat! on 11.08.15.
// Copyright (c) 2015 Nat! - <NAME>.
// Copyright (c) 2015 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided tha... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-object.h | //
// mulle_objc_object.h
// mulle-objc-runtime
//
// Created by Nat! on 16/11/14.
// Copyright (c) 2014 Nat! - <NAME>.
// Copyright (c) 2014 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following c... |
mulle-objc/mulle-objc-runtime | src/debug/mulle-objc-gdb.c | <reponame>mulle-objc/mulle-objc-runtime
//
// mulle-objc-gdb.h
// mulle-objc-runtime
//
// Created by Nat! on 14.10.19
// Copyright © 2019 <NAME>. All rights reserved.
// Copyright © 2019 Codeon GmbH. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, a... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-methodlist.h | //
// mulle_objc_methodlist.h
// mulle-objc-runtime
//
// Created by Nat! on 10.03.15.
// Copyright (c) 2015 Nat! - <NAME>.
// Copyright (c) 2015 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the followi... |
mulle-objc/mulle-objc-runtime | test-startup/methods/inheritance/pointerarray.h | //
// pointerarray.h
// mulle-objc-runtime
//
// Created by Nat! on 10.03.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef pointerarray_h__
#define pointerarray_h__
#pragma mark -
#pragma mark _pointerarray, simple growing array all inlined
struct _pointerarray
{
size_t n;
size_t s... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-callqueue.c | <reponame>mulle-objc/mulle-objc-runtime
//
// mulle_objc_callqueue.c
// mulle-objc-runtime
//
// Created by Nat! on 20/11/14.
// Copyright (c) 2014 Nat! - <NAME>.
// Copyright (c) 2014 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, ... |
mulle-objc/mulle-objc-runtime | test-startup/methods/inheritance/test_simple_inheritance.c | //
// test_simple_inheritance.c
// mulle-objc-runtime
//
// Created by Nat! on 10.03.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "test_simple_inheritance.h"
#include "test_runtime_ids.h"
#include <errno.h>
#pragma mark -
#pragma mark common class setup for test
void create_ABC_classes( ... |
mulle-objc/mulle-objc-runtime | test-startup/methods/inheritance/test_retain_release.c | <gh_stars>100-1000
//
// test_retain_release.c
// mulle-objc-runtime
//
// Created by Nat! on 14.03.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include <mulle-objc-runtime/mulle-objc-runtime.h>
#include <mulle-testallocator/mulle-testallocator.h>
#include "test_runtime_ids.h"
static intptr_t get... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-kvccache.h | //
// mulle_objc_kvccache.h
// mulle-objc-runtime
//
// Created by Nat! on 18.07.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-property.h | //
// mulle_objc_property.h
// mulle-objc-runtime
//
// Created by Nat! on 05.03.15.
// Copyright (c) 2015 Nat! - <NAME>.
// Copyright (c) 2015 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following... |
mulle-objc/mulle-objc-runtime | src/reflect/_mulle-objc-runtime-include-private.h | <reponame>mulle-objc/mulle-objc-runtime<filename>src/reflect/_mulle-objc-runtime-include-private.h
/*
* This file will be regenerated by `mulle-sourcetree-to-c` via
* `mulle-sde reflect` and any edits will be lost.
* Suppress generation of this file with:
*
* mulle-sde environment set MULLE_SOURCETREE_T... |
mulle-objc/mulle-objc-runtime | test-startup/methods/inheritance/test_simple_inheritance.h | <reponame>mulle-objc/mulle-objc-runtime
//
// test_simple_inheritance.h
// mulle-objc-runtime
//
// Created by Nat! on 10.03.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include <mulle-objc-runtime/mulle-objc-runtime.h>
struct abc_classes
{
struct _mulle_objc_infraclass *A_infra;
struct _mul... |
mulle-objc/mulle-objc-runtime | test-compiler-runtime/0_runtime/load-categories/ProtoClass2.h | #include <mulle-objc-runtime/mulle-objc-runtime.h>
@class ProtoClass2;
@protocol ProtoClass2
@end
|
mulle-objc/mulle-objc-runtime | src/mulle-objc-propertylist.h | <reponame>mulle-objc/mulle-objc-runtime
//
// mulle_objc_propertylist.h
// mulle-objc-runtime
//
// Created by Nat! on 23.01.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modificatio... |
mulle-objc/mulle-objc-runtime | src/debug/mulle-objc-html.c | <filename>src/debug/mulle-objc-html.c<gh_stars>100-1000
//
// common.inc
// mulle-objc-runtime
//
// Created by Nat! on 10.05.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modificati... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-universe-exception.c | <filename>src/mulle-objc-universe-exception.c
//
// mulle-objc-universe-fail.h
// mulle-objc-runtime
//
// Created by Nat! on 16/11/14.
// Copyright (c) 2014-2018 Nat! - <NAME>.
// Copyright (c) 2014-2018 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or withou... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-uniqueidarray.h | <reponame>mulle-objc/mulle-objc-runtime<gh_stars>100-1000
//
// mulle_objc_uniqueidarray.h
// mulle-objc-runtime-universe
//
// Created by Nat! on 28.05.17
// Copyright (c) 2017 Nat! - <NAME>.
// Copyright (c) 2017 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-protocol.h | //
// mulle_objc_protocol.h
// mulle-objc-runtime
//
// Created by Nat! on 30.05.17
// Copyright (c) 2017 Nat! - <NAME>.
// Copyright (c) 2017 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following ... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-classpair.h | //
// mulle_objc_classpair.h
// mulle-objc-runtime
//
// Created by Nat! on 17/04/08.
// Copyright (c) 2017 Nat! - <NAME>.
// Copyright (c) 2017 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the followin... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-fastclasstable.h | <gh_stars>100-1000
//
// mulle_objc_fastclasstable.h
// mulle-objc-runtime
//
// Created by Nat! on 01.02.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted pr... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-infraclass.c | //
// mulle_objc_infraclass.h
// mulle-objc-runtime
//
// Created by Nat! on 17/04/07
// Copyright (c) 2017 Nat! - <NAME>.
// Copyright (c) 2017 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the followin... |
mulle-objc/mulle-objc-runtime | test-compiler-runtime/0_runtime/load-classes/Foo2.h | <filename>test-compiler-runtime/0_runtime/load-classes/Foo2.h
#import "Base.h"
@class ProtoClass2;
@protocol ProtoClass2;
@protocol Proto1;
@interface Foo2 : Base < ProtoClass2, Proto1>
@end
|
mulle-objc/mulle-objc-runtime | test/signature/enumerate.c | <reponame>mulle-objc/mulle-objc-runtime
//
// main.c
// test-runtime-2
//
// Created by Nat! on 19/11/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#ifndef __MULLE_OBJC__
# define __MULLE_OBJC_NO_TPS__
# define __MULLE_OBJC_FCS__
#endif
#include <mulle-objc-runtime/mulle-objc-runtime.h>
#include <mul... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-builtin.h | //
// mulle_objc_builtin.h
// mulle-objc-runtime
//
// Created by Nat! on 28.01.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following ... |
mulle-objc/mulle-objc-runtime | test-compiler-runtime/0_runtime/load-categories/Foo.h | <filename>test-compiler-runtime/0_runtime/load-categories/Foo.h
#import "Base.h"
@interface Foo : Base
@end
|
mulle-objc/mulle-objc-runtime | src/mulle-objc-call.c | //
// mulle_objc_message.c
// mulle-objc-runtime
//
// Created by Nat! on 16/11/14.
// Copyright (c) 2014 Nat! - <NAME>.
// Copyright (c) 2014 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following ... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-protocollist.c | <reponame>mulle-objc/mulle-objc-runtime
//
// mulle_objc_protocollist.c
// mulle-objc-runtime-universe
//
// Created by Nat! on 30.05.17
// Copyright (c) 2017 Nat! - <NAME>.
// Copyright (c) 2017 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// mod... |
mulle-objc/mulle-objc-runtime | test/kvc/kvc.c | //
// main.c
// test-runtime-2
//
// Created by Nat! on 19/11/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#ifndef __MULLE_OBJC__
# define __MULLE_OBJC_NO_TPS__
# define __MULLE_OBJC_FCS__
#endif
#include <mulle-objc-runtime/mulle-objc-runtime.h>
#include <stdio.h>
#define ___Foo_classid M... |
mulle-objc/mulle-objc-runtime | research-cache-spread/main.c | <filename>research-cache-spread/main.c<gh_stars>100-1000
//
// main.c
// research-cache-spread
//
// Created by Nat! on 16.03.15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define USE_MERSENNE 0
#ifdef US... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-taggedpointer.h | //
// mulle_objc_taggedpointer.h
// mulle-objc-runtime
//
// Created by Nat! on 14.07.16.
// Copyright (c) 2016 Nat! - <NAME>.
// Copyright (c) 2016 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the foll... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-class-search.h | //
// mulle_objc_class_search.h
// mulle-objc-runtime
//
// Created by Nat! on 17/08/03.
// Copyright (c) 2014-2017 Nat! - <NAME>.
// Copyright (c) 2014-2017 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-methodlist.c | //
// mulle_objc_methodlist.c
// mulle-objc-runtime
//
// Created by Nat! on 10.03.15.
// Copyright (c) 2015 Nat! - <NAME>.
// Copyright (c) 2015 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the followi... |
mulle-objc/mulle-objc-runtime | src/mulle-objc-universe.c | //
// mulle_objc_universe.c
// mulle-objc-runtime
//
// Created by Nat! on 09.03.15.
// Copyright (c) 2015 Nat! - <NAME>.
// Copyright (c) 2015 Codeon GmbH.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following... |
mulle-objc/mulle-objc-runtime | test-compiler-runtime/0_runtime/load-classes/Proto2.h | <filename>test-compiler-runtime/0_runtime/load-classes/Proto2.h
#include <mulle-objc-runtime/mulle-objc-runtime.h>
@protocol Proto2
@end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.