代码搜索:stdlib
找到约 10,000 项符合「stdlib」的源代码
代码结果 10,000
www.eeworm.com/read/326893/13111005
c showpath.c
#include
#include
void main (void)
{
char *entry;
entry = getenv("PATH");
if (*entry)
printf("PATH=%s\n", entry);
else
printf("PATH is not de
www.eeworm.com/read/326893/13111151
c min_max.c
#include
#include
void main (void)
{
printf("Maximum of %f and %f is %f\n",
10.0, 25.0, max(10.0, 25.0));
printf("Minimum of %f and %f is %f\n",
10.0,
www.eeworm.com/read/139738/13137141
makefile
# GNU Makefile for building user programs to run on top of Nachos
#
# Things to be aware of:
#
# The value of the ARCHDIR environment variable must be set before using
# this makefile. If you are u
www.eeworm.com/read/139738/13137164
c strcat.c
#include "stdlib.h"
/* concatenates s2 to the end of s1 and returns s1 */
char *strcat(char *s1, const char *s2) {
char* result = s1;
while (*s1 != 0)
s1++;
do {
*(s1++) = *(s2);
www.eeworm.com/read/139738/13137185
c rm.c
#include "syscall.h"
#include "stdio.h"
#include "stdlib.h"
int main(int argc, char** argv)
{
if (argc!=2) {
printf("Usage: rm \n");
return 1;
}
if (unlink(argv[1]) != 0) {
www.eeworm.com/read/139738/13137188
c assert.c
#include "stdio.h"
#include "stdlib.h"
void __assert(char* file, int line) {
printf("\nAssertion failed: line %d file %s\n", line, file);
exit(1);
}
www.eeworm.com/read/139738/13137237
c strcpy.c
#include "stdlib.h"
/* copies src to dst, returning dst */
char *strcpy(char *dst, const char *src) {
int n=0;
char *result = dst;
do {
*(dst++) = *src;
n++;
}
while (*(src++) !=
www.eeworm.com/read/139738/13137240
c atoi.c
#include "stdlib.h"
int atoi(const char *s) {
int result=0, sign=1;
if (*s == -1) {
sign = -1;
s++;
}
while (*s >= '0' && *s
www.eeworm.com/read/139738/13137243
c strncmp.c
#include "stdlib.h"
/* lexicographically compares a and b up to n chars */
int strncmp(const char* a, const char* b, int n)
{
assert(n > 0);
do {
if (*a < *b)
return -1;
if (*a >
www.eeworm.com/read/139738/13137253
c stdio.c
#include "stdio.h"
#include "stdlib.h"
int fgetc(int fd) {
unsigned char c;
while (read(fd, &c, 1) != 1);
return c;
}
void fputc(char c, int fd) {
write(fd, &c, 1);
}