stupid sun

This commit is contained in:
rsc 2005-01-14 18:46:35 +00:00
parent 7ea6c4fcbe
commit cb98c6f854
3 changed files with 9 additions and 11 deletions

View file

@ -6,7 +6,7 @@ choochar(void)
{ {
/* choose funny characters to delimit fields */ /* choose funny characters to delimit fields */
int had[128], ilin, icol, k; int had[128], ilin, icol, k;
unsigned char *s; char *s;
for (icol = 0; icol < 128; icol++) for (icol = 0; icol < 128; icol++)
had[icol] = 0; had[icol] = 0;
@ -23,19 +23,19 @@ choochar(void)
s = table[ilin][icol].col; s = table[ilin][icol].col;
if (point(s)) if (point(s))
while (*s) while (*s)
had[*s++] = 1; had[(unsigned char)*s++] = 1;
s = table[ilin][icol].rcol; s = table[ilin][icol].rcol;
if (point(s)) if (point(s))
while (*s) while (*s)
had[*s++] = 1; had[(unsigned char)*s++] = 1;
} }
} }
/* choose first funny character */ /* choose first funny character */
for ( for (
s = "\002\003\005\006\007!%&#/?,:;<=>@`^~_{}+-*ABCDEFGHIJKMNOPQRSTUVWXYZabcdefgjkoqrstwxyz"; s = "\002\003\005\006\007!%&#/?,:;<=>@`^~_{}+-*ABCDEFGHIJKMNOPQRSTUVWXYZabcdefgjkoqrstwxyz";
*s; s++) { *s; s++) {
if (had[*s] == 0) { if (had[(unsigned char)*s] == 0) {
F1 = *s; F1 = (unsigned char)*s;
had[F1] = 1; had[F1] = 1;
break; break;
} }
@ -44,8 +44,8 @@ choochar(void)
for ( for (
s = "\002\003\005\006\007:_~^`@;,<=>#%&!/?{}+-*ABCDEFGHIJKMNOPQRSTUVWXZabcdefgjkoqrstuwxyz"; s = "\002\003\005\006\007:_~^`@;,<=>#%&!/?{}+-*ABCDEFGHIJKMNOPQRSTUVWXZabcdefgjkoqrstuwxyz";
*s; s++) { *s; s++) {
if (had[*s] == 0) { if (had[(unsigned char)*s] == 0) {
F2 = *s; F2 = (unsigned char)*s;
break; break;
} }
} }

View file

@ -1,10 +1,7 @@
typedef struct MetaBlock MetaBlock; typedef struct MetaBlock MetaBlock;
typedef struct MetaEntry MetaEntry; typedef struct MetaEntry MetaEntry;
enum #define MaxBlock (1UL<<31)
{
MaxBlock = (1UL<<31),
};
enum { enum {
BytesPerEntry = 100, /* estimate of bytes per dir entries - determines number of index entries in the block */ BytesPerEntry = 100, /* estimate of bytes per dir entries - determines number of index entries in the block */

View file

@ -1,3 +1,4 @@
#include <u.h>
#include <sys/stat.h> #include <sys/stat.h>
#include "stdinc.h" #include "stdinc.h"
#include "vac.h" #include "vac.h"