diff options
author | Tom Yu <tlyu@mit.edu> | 2009-10-31 00:48:38 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2009-10-31 00:48:38 +0000 |
commit | 02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch) | |
tree | 61b9147863cd8be3eff63903dc36cae168254bd5 /src/lib/krb5/unicode | |
parent | 162ab371748cba0cc6f172419bd6e71fa04bb878 (diff) | |
download | krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.bz2 |
make mark-cstyle
make reindent
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/unicode')
-rw-r--r-- | src/lib/krb5/unicode/ucdata/ucdata.c | 10 | ||||
-rw-r--r-- | src/lib/krb5/unicode/ucdata/ucdata.h | 8 | ||||
-rw-r--r-- | src/lib/krb5/unicode/ucdata/ucgendat.c | 20 | ||||
-rw-r--r-- | src/lib/krb5/unicode/ucdata/uctable.h | 1 | ||||
-rw-r--r-- | src/lib/krb5/unicode/ucstr.c | 14 | ||||
-rw-r--r-- | src/lib/krb5/unicode/utbm/utbmstub.c | 2 |
6 files changed, 27 insertions, 28 deletions
diff --git a/src/lib/krb5/unicode/ucdata/ucdata.c b/src/lib/krb5/unicode/ucdata/ucdata.c index 590ad2f..1e46744 100644 --- a/src/lib/krb5/unicode/ucdata/ucdata.c +++ b/src/lib/krb5/unicode/ucdata/ucdata.c @@ -59,7 +59,7 @@ typedef struct { krb5_ui_2 cnt; union { krb5_ui_4 bytes; - krb5_ui_2 len[2]; + krb5_ui_2 len[2]; } size; } _ucheader_t; @@ -618,7 +618,7 @@ uccomp_hangul(krb5_ui_4 *str, int len) LCount = 19, VCount = 21, TCount = 28, NCount = VCount * TCount, /* 588 */ SCount = LCount * NCount; /* 11172 */ - + int i, rlen; krb5_ui_4 ch, last, lindex, sindex; @@ -638,7 +638,7 @@ uccomp_hangul(krb5_ui_4 *str, int len) continue; } } - + /* check if two current characters are LV and T */ sindex = last - SBase; if (sindex < (krb5_ui_4) SCount @@ -671,7 +671,7 @@ uccanoncomp(krb5_ui_4 *str, int len) stpos = 0; copos = 1; prevcl = uccombining_class(st) == 0 ? 0 : 256; - + for (i = 1; i < len; i++) { ch = str[i]; cl = uccombining_class(ch); @@ -885,7 +885,7 @@ uckdecomp(krb5_ui_4 code, krb5_ui_4 *num, krb5_ui_4 **decomp) if (code < _uckdcmp_nodes[0]) { return 0; } - + l = 0; r = _uckdcmp_nodes[_uckdcmp_size] - 1; diff --git a/src/lib/krb5/unicode/ucdata/ucdata.h b/src/lib/krb5/unicode/ucdata/ucdata.h index ff3bb34..00ece35 100644 --- a/src/lib/krb5/unicode/ucdata/ucdata.h +++ b/src/lib/krb5/unicode/ucdata/ucdata.h @@ -261,7 +261,7 @@ int uckdecomp(krb5_ui_4 code, krb5_ui_4 *num, krb5_ui_4 **decomp); */ int ucdecomp_hangul(krb5_ui_4 code, krb5_ui_4 *num, krb5_ui_4 decomp[]); -/* +/* * This routine does canonical decomposition of the string in of length * inlen, and returns the decomposed string in out with length outlen. * The memory for out is allocated by this routine. It returns the length @@ -269,14 +269,14 @@ int ucdecomp_hangul(krb5_ui_4 code, krb5_ui_4 *num, krb5_ui_4 decomp[]); */ int uccanondecomp (const krb5_ui_4 *in, int inlen, krb5_ui_4 **out, int *outlen); - -/* + +/* * Equivalent to uccanondecomp() except that it includes compatibility * decompositions. */ int uccompatdecomp(const krb5_ui_4 *in, int inlen, krb5_ui_4 **out, int *outlen); - + /************************************************************************** * * Functions for getting combining classes. diff --git a/src/lib/krb5/unicode/ucdata/ucgendat.c b/src/lib/krb5/unicode/ucdata/ucgendat.c index 42b0ecd..a6d38fb 100644 --- a/src/lib/krb5/unicode/ucdata/ucgendat.c +++ b/src/lib/krb5/unicode/ucdata/ucgendat.c @@ -449,7 +449,7 @@ add_decomp(krb5_ui_4 code, short compat) pdecomps_used = &decomps_used; pdecomps_size = &decomps_size; } - + /* * Add the code to the composite property. */ @@ -953,7 +953,7 @@ read_cdata(FILE *in) i++; } for (e = s; *e && *e != ';'; e++) ; - + ordered_range_insert(code, s, e - s); /* @@ -1125,7 +1125,7 @@ find_decomp(krb5_ui_4 code, short compat) { long l, r, m; _decomp_t *decs; - + l = 0; r = (compat ? kdecomps_used : decomps_used) - 1; decs = compat ? kdecomps : decomps; @@ -1479,12 +1479,12 @@ write_cdata(char *opath) * Generate the composition data. * *****************************************************************/ - + /* * Create compositions from decomposition data */ create_comps(); - + #if HARDCODE_DATA fprintf(out, PREF "krb5_ui_4 _uccomp_size = %ld;\n\n", comps_used * 4L); @@ -1512,28 +1512,28 @@ write_cdata(char *opath) snprintf(path, sizeof path, "%s" LDAP_DIRSEP "comp.dat", opath); if ((out = fopen(path, "wb")) == 0) return; - + /* * Write the header. */ hdr[1] = (krb5_ui_2) comps_used * 4; fwrite((char *) hdr, sizeof(krb5_ui_2), 2, out); - + /* * Write out the byte count to maintain header size. */ bytes = comps_used * sizeof(_comp_t); fwrite((char *) &bytes, sizeof(krb5_ui_4), 1, out); - + /* * Now, if comps exist, write them out. */ if (comps_used > 0) fwrite((char *) comps, sizeof(_comp_t), comps_used, out); - + fclose(out); #endif - + /***************************************************************** * * Generate the decomposition data. diff --git a/src/lib/krb5/unicode/ucdata/uctable.h b/src/lib/krb5/unicode/ucdata/uctable.h index 19d334b..98a8745 100644 --- a/src/lib/krb5/unicode/ucdata/uctable.h +++ b/src/lib/krb5/unicode/ucdata/uctable.h @@ -14303,4 +14303,3 @@ static const short _ucnum_vals[] = { 0x002a, 0x0001, 0x002b, 0x0001, 0x002c, 0x0001, 0x002d, 0x0001, 0x002e, 0x0001, 0x002f, 0x0001, 0x0030, 0x0001, 0x0031, 0x0001 }; - diff --git a/src/lib/krb5/unicode/ucstr.c b/src/lib/krb5/unicode/ucstr.c index ec23688..fa6796f 100644 --- a/src/lib/krb5/unicode/ucstr.c +++ b/src/lib/krb5/unicode/ucstr.c @@ -4,13 +4,13 @@ */ /* * This work is part of OpenLDAP Software <http://www.openldap.org/>. - * + * * Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted only as authorized by the OpenLDAP Public * License. - * + * * A copy of this license is available in file LICENSE in the top-level * directory of the distribution or, alternatively, at * <http://www.OpenLDAP.org/license.html>. @@ -23,7 +23,7 @@ #include <ctype.h> -int +int krb5int_ucstrncmp( const krb5_unicode * u1, const krb5_unicode * u2, @@ -40,7 +40,7 @@ krb5int_ucstrncmp( return 0; } -int +int krb5int_ucstrncasecmp( const krb5_unicode * u1, const krb5_unicode * u2, @@ -91,7 +91,7 @@ krb5int_ucstrncasechr( return NULL; } -void +void krb5int_ucstr2upper( krb5_unicode * u, size_t n) @@ -309,7 +309,7 @@ cleanup: /* compare UTF8-strings, optionally ignore casing */ /* slow, should be optimized */ -int +int krb5int_utf8_normcmp( const krb5_data * data1, const krb5_data * data2, diff --git a/src/lib/krb5/unicode/utbm/utbmstub.c b/src/lib/krb5/unicode/utbm/utbmstub.c index 8666328..51fa673 100644 --- a/src/lib/krb5/unicode/utbm/utbmstub.c +++ b/src/lib/krb5/unicode/utbm/utbmstub.c @@ -55,7 +55,7 @@ _utbm_isspace(ucs4_t c, int compress) c == 0x2028 || c == 0x2029 || _platform_isspace(c)) ? 1 : 0; return _platform_isspace(c); - + } /* |