clean up for unix port

This commit is contained in:
rsc 2004-12-26 21:50:14 +00:00
parent 5c8a042171
commit e5aa96acbf
58 changed files with 160 additions and 127 deletions

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
enum
{

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
Rune*
runestrcat(Rune *s1, Rune *s2)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
Rune*
runestrchr(Rune *s, Rune c)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
int
runestrcmp(Rune *s1, Rune *s2)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
Rune*
runestrcpy(Rune *s1, Rune *s2)

View file

@ -14,8 +14,8 @@
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
Rune*
runestrdup(Rune *s)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
Rune*
runestrecpy(Rune *s1, Rune *es1, Rune *s2)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
long
runestrlen(Rune *s)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
Rune*
runestrncat(Rune *s1, Rune *s2, long n)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
int
runestrncmp(Rune *s1, Rune *s2, long n)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
Rune*
runestrncpy(Rune *s1, Rune *s2, long n)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
Rune*
runestrrchr(Rune *s, Rune c)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
/*
* Return pointer to first occurrence of s2 in s1,

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
/*
* alpha ranges -
@ -1030,8 +1030,7 @@ Rune __totitle1[] =
0x01f3, 499, /* dz Dz */
};
static
Rune*
static Rune*
bsearch(Rune c, Rune *t, int n, int ne)
{
Rune *p;

View file

@ -1,14 +1,33 @@
#define uchar _utfuchar
#define ushort _utfushort
#define uint _utfuint
#define ulong _utfulong
#define vlong _utfvlong
#define uvlong _utfuvlong
/*
* compiler directive on Plan 9
*/
#ifndef USED
#define USED(x) if(x);else
#endif
/*
* easiest way to make sure these are defined
*/
#define uchar _fmtuchar
#define ushort _fmtushort
#define uint _fmtuint
#define ulong _fmtulong
#define vlong _fmtvlong
#define uvlong _fmtuvlong
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned long long uvlong;
typedef long long vlong;
/*
* nil cannot be ((void*)0) on ANSI C,
* because it is used for function pointers
*/
#undef nil
#define nil 0
#undef nelem
#define nelem ((void*)0)
#define nelem(x) (sizeof(x)/sizeof((x)[0]))
#define nil ((void*)0)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
char*
utfecpy(char *to, char *e, char *from)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
int
utflen(char *s)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
int
utfnlen(char *s, long m)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
char*
utfrrune(char *s, long c)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
char*
utfrune(char *s, long c)

View file

@ -13,8 +13,8 @@
*/
#include <stdarg.h>
#include <string.h>
#include "plan9.h"
#include "utf.h"
#include "utfdef.h"
/*