Patch by Vasilis Kaoutsis: Style cleanup, "OpenBeOS license" -> "MIT license".

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22537 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-10-13 17:18:34 +00:00
parent 63355585fb
commit e701d86af5
15 changed files with 69 additions and 80 deletions
@@ -1,7 +1,7 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include "libioP.h" #include "libioP.h"
@@ -1,7 +1,7 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <pthread.h> #include <pthread.h>
@@ -155,4 +155,3 @@ pthread_mutexattr_setprotocol(pthread_mutexattr_t *_mutexAttr, int protocol)
// not implemented // not implemented
return B_NOT_ALLOWED; return B_NOT_ALLOWED;
} }
+6 -7
View File
@@ -1,19 +1,18 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <sys/types.h> #include <sys/types.h>
#include <string.h> #include <string.h>
char * char*
strchrnul(const char *string, int c) strchrnul(const char* string, int c)
{ {
while (string[0] != (char)c && string[0]) while (string[0] != (char)c && string[0])
string++; string++;
return (char *)string; return (char*)string;
} }
+5 -6
View File
@@ -1,17 +1,17 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
char * char*
strdup(const char *string) strdup(const char *string)
{ {
char *copied; char* copied;
size_t length; size_t length;
// unlike the standard strdup() function, the BeOS implementation // unlike the standard strdup() function, the BeOS implementation
@@ -27,4 +27,3 @@ strdup(const char *string)
memcpy(copied, string, length); memcpy(copied, string, length);
return copied; return copied;
} }
+4 -5
View File
@@ -1,7 +1,7 @@
/* /*
** Copyright 2002-2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <sys/stat.h> #include <sys/stat.h>
@@ -18,10 +18,9 @@
int int
mkdir(const char *path, mode_t mode) mkdir(const char* path, mode_t mode)
{ {
status_t status = _kern_create_dir(-1, path, mode); status_t status = _kern_create_dir(-1, path, mode);
RETURN_AND_SET_ERRNO(status); RETURN_AND_SET_ERRNO(status);
} }
+1 -1
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
+9 -10
View File
@@ -1,15 +1,15 @@
/* /*
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <time.h> #include <time.h>
#include <stdio.h> #include <stdio.h>
static char * static char*
print_time(char *buffer, size_t bufferSize, const struct tm *tm) print_time(char* buffer, size_t bufferSize, const struct tm* tm)
{ {
// ToDo: this should probably use the locale kit to get these names // ToDo: this should probably use the locale kit to get these names
@@ -31,8 +31,8 @@ print_time(char *buffer, size_t bufferSize, const struct tm *tm)
} }
char * char*
asctime(const struct tm *tm) asctime(const struct tm* tm)
{ {
static char buffer[28]; static char buffer[28];
// is enough to hold normal dates // is enough to hold normal dates
@@ -41,10 +41,9 @@ asctime(const struct tm *tm)
} }
char * char*
asctime_r(const struct tm *tm, char *buffer) asctime_r(const struct tm* tm, char* buffer)
{ {
return print_time(buffer, 26, tm); return print_time(buffer, 26, tm);
// 26 bytes seems to be required by the standard, so we can't write more // 26 bytes seems to be required by the standard, so we can't write more
} }
+4 -5
View File
@@ -1,7 +1,7 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <time.h> #include <time.h>
@@ -9,7 +9,7 @@
time_t time_t
time(time_t *timer) time(time_t* timer)
{ {
time_t secs = real_time_clock(); time_t secs = real_time_clock();
@@ -18,4 +18,3 @@ time(time_t *timer)
return secs; return secs;
} }
+4 -5
View File
@@ -1,7 +1,7 @@
/* /*
** Copyright 2002-2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <unistd.h> #include <unistd.h>
@@ -18,10 +18,9 @@
int int
access(const char *path, int accessMode) access(const char* path, int accessMode)
{ {
status_t status = _kern_access(path, accessMode); status_t status = _kern_access(path, accessMode);
RETURN_AND_SET_ERRNO(status); RETURN_AND_SET_ERRNO(status);
} }
+3 -3
View File
@@ -1,7 +1,7 @@
/* /*
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <unistd.h> #include <unistd.h>
+5 -6
View File
@@ -1,7 +1,7 @@
/* /*
** Copyright 2002-2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <unistd.h> #include <unistd.h>
@@ -22,12 +22,12 @@ int
ioctl(int fd, ulong cmd, ...) ioctl(int fd, ulong cmd, ...)
{ {
va_list args; va_list args;
void *argument; void* argument;
size_t size; size_t size;
int status; int status;
va_start(args, cmd); va_start(args, cmd);
argument = va_arg(args, void *); argument = va_arg(args, void*);
size = va_arg(args, size_t); size = va_arg(args, size_t);
va_end(args); va_end(args);
@@ -35,4 +35,3 @@ ioctl(int fd, ulong cmd, ...)
RETURN_AND_SET_ERRNO(status) RETURN_AND_SET_ERRNO(status)
} }
+3 -4
View File
@@ -1,7 +1,7 @@
/* /*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <OS.h> #include <OS.h>
@@ -34,4 +34,3 @@ pipe(int streams[2])
return 0; return 0;
} }
+9 -10
View File
@@ -1,12 +1,12 @@
/* /*
** Copyright 2001, Manuel J. Petit. All rights reserved. * Copyright 2001, Manuel J. Petit. All rights reserved.
** Distributed under the terms of the NewOS License. * Distributed under the terms of the NewOS License.
*/ */
/* /*
** Copyright 2002, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <unistd.h> #include <unistd.h>
@@ -23,7 +23,7 @@
ssize_t ssize_t
read(int fd, void *buffer, size_t bufferSize) read(int fd, void* buffer, size_t bufferSize)
{ {
ssize_t status = _kern_read(fd, -1, buffer, bufferSize); ssize_t status = _kern_read(fd, -1, buffer, bufferSize);
@@ -32,7 +32,7 @@ read(int fd, void *buffer, size_t bufferSize)
ssize_t ssize_t
read_pos(int fd, off_t pos, void *buffer, size_t bufferSize) read_pos(int fd, off_t pos, void* buffer, size_t bufferSize)
{ {
ssize_t status; ssize_t status;
if (pos < 0) { if (pos < 0) {
@@ -46,7 +46,7 @@ read_pos(int fd, off_t pos, void *buffer, size_t bufferSize)
ssize_t ssize_t
pread(int fd, void *buffer, size_t bufferSize, off_t pos) pread(int fd, void* buffer, size_t bufferSize, off_t pos)
{ {
ssize_t status; ssize_t status;
if (pos < 0) { if (pos < 0) {
@@ -57,4 +57,3 @@ pread(int fd, void *buffer, size_t bufferSize, off_t pos)
RETURN_AND_SET_ERRNO(status); RETURN_AND_SET_ERRNO(status);
} }
+4 -4
View File
@@ -1,8 +1,8 @@
/* /*
** Copyright 2003, Daniel Reinhold, [email protected]. All rights reserved. * Copyright 2003, Daniel Reinhold, [email protected]. All rights reserved.
** Copyright 2007, François Revol, [email protected]. All rights reserved. * Copyright 2007, François Revol, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#include <SupportDefs.h> #include <SupportDefs.h>
+6 -7
View File
@@ -1,10 +1,10 @@
/* /*
** Copyright 2002-2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
** *
** Copyright 2001, Manuel J. Petit. All rights reserved. * Copyright 2001, Manuel J. Petit. All rights reserved.
** Distributed under the terms of the NewOS License. * Distributed under the terms of the NewOS License.
*/ */
#include <unistd.h> #include <unistd.h>
@@ -55,4 +55,3 @@ pwrite(int fd, const void *buffer, size_t bufferSize, off_t pos)
RETURN_AND_SET_ERRNO(status); RETURN_AND_SET_ERRNO(status);
} }