| Change 615029530 by aprotopa@aprotopa:sardine:1943:citc on 2024/03/12 07:13:27 |
| |
| Mirror Hunspell source to a public read-only repo on Google third-party-mirror. |
| |
| Google Ads Editor is a native app that ships with the Hunspell library. |
| Following best practice for complying with the project's reciprocal license, we |
| will mirror the source including Google customizations/bug fixes to the public |
| mirror to be located at https://third-party-mirror.googlesource.com/hunspell |
| |
| This excludes the spellcheck dictionaries which are licensed separately. Editor |
| uses the dictionaries from the Chromium repo so they aren't relevant here. |
| |
| Also some trivial changes so that comments comply with formatting expections |
| of the rule which scrubs employee LDAPs from the source. |
| |
| Validation: |
| copybara validate copy.bara.sky |
| |
| Dry run: |
| copybara copy.bara.sky presubmit_piper_to_git <patch CL#> \ |
| --init-history \ |
| --squash \ |
| --ignore-noop \ |
| --force \ |
| --git-destination-path <path to dump local git repo> \ |
| --dry-run |
| |
| PRESUBMIT=passed |
| BUG=307550303 |
| R=itandetnik,mghiware,tjbarron |
| CC=ape-eng,bkuang |
| APPROVED=mghiware |
| REQUIRED_REVIEW=1 |
| DELTA=47 (38 added, 0 deleted, 9 changed) |
| DELTA_BY_EXTENSION=cxx=7,hxx=2,sky=38 |
| OCL=609044675 |
| |
| Affected files ... |
| |
| ... //depot//copy.bara.sky#1 add |
| ... //depot//src/hunspell/affixmgr.cxx#18 edit |
| ... //depot//src/hunspell/atypes.hxx#3 edit |
| ... //depot//src/hunspell/suggestmgr.cxx#8 edit |
| ... //depot//src/parsers/textparser.cxx#3 edit |
| ... //depot//src/parsers/textparser.hxx#3 edit |
| |
| ==== //depot//src/hunspell/affixmgr.cxx#17 - /google/src/files/615029530/depot//src/hunspell/affixmgr.cxx ==== |
| --- /google/src/files/613323525/depot//src/hunspell/affixmgr.cxx 2024-03-06 16:30:53.000000000 -0500 |
| +++ /google/src/files/615029530/depot//src/hunspell/affixmgr.cxx 2024-03-12 10:13:27.000000000 -0400 |
| @@ -1359,7 +1359,7 @@ |
| // check compound patterns |
| int AffixMgr::defcpd_check(hentry *** words, short wnum, hentry * rv, hentry ** def, char all) |
| { |
| - // Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size |
| + // NOTE: Changed to use scoped_ptr to avoid 64KB stack size |
| // problem. |
| std::unique_ptr<signed short[]> scoped_btpp(new signed short[MAXWORDLEN]); |
| signed short * btpp = scoped_btpp.get(); // metacharacter (*, ?) positions for backtracking |
| @@ -1543,7 +1543,7 @@ |
| struct hentry ** rwords = // buffer for COMPOUND pattern checking |
| (struct hentry**) malloc(sizeof(struct hentry*) * (MAXWORDLEN)); |
| |
| - // Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size |
| + // NOTE: Changed to use scoped_ptr to avoid 64KB stack size |
| // problem. |
| std::unique_ptr<char[]> scoped_st(new char[MAXWORDUTF8LEN + 4]); |
| char * st = scoped_st.get(); |
| @@ -2081,10 +2081,10 @@ |
| |
| struct hentry * rv = NULL; |
| struct hentry * rv_first; |
| - // Note(jiho@google.com): Changed to use malloc to avoid stack overflow. |
| + // NOTE: Changed to use malloc to avoid stack overflow. |
| struct hentry ** rwords = // buffer for COMPOUND pattern checking |
| (struct hentry**) malloc(sizeof(struct hentry*) * (MAXWORDLEN)); |
| - // Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size |
| + // NOTE: Changed to use scoped_ptr to avoid 64KB stack size |
| // problem. |
| std::unique_ptr<char[]> scoped_st(new char[MAXWORDUTF8LEN + 4]); |
| char * st = scoped_st.get(); |
| ==== //depot//src/hunspell/atypes.hxx#2 - /google/src/files/615029530/depot//src/hunspell/atypes.hxx ==== |
| --- /google/src/files/49864191/depot//src/hunspell/atypes.hxx 2013-07-24 23:12:12.000000000 -0400 |
| +++ /google/src/files/615029530/depot//src/hunspell/atypes.hxx 2024-03-12 10:13:27.000000000 -0400 |
| @@ -20,7 +20,7 @@ |
| #define SETSIZE 256 |
| #define CONTSIZE 65536 |
| #define MAXWORDLEN 100 |
| -// Note(jiho@google.com): Korean Hunspell dictionary doesn't use UTF-8 directly. |
| +// NOTE: Korean Hunspell dictionary doesn't use UTF-8 directly. |
| // It decomposes one single Korean character to three characters. So, one single |
| // UTF-8 Korean character(3 bytes) will eventually take 9 bytes. At least |
| // MAXWORDLEN * 3 bytes are required for handling Korean dictionary. |
| ==== //depot//src/hunspell/suggestmgr.cxx#7 - /google/src/files/615029530/depot//src/hunspell/suggestmgr.cxx ==== |
| --- /google/src/files/614065610/depot//src/hunspell/suggestmgr.cxx 2024-03-08 18:43:37.000000000 -0500 |
| +++ /google/src/files/615029530/depot//src/hunspell/suggestmgr.cxx 2024-03-12 10:13:27.000000000 -0400 |
| @@ -156,7 +156,7 @@ |
| |
| if (utf8) { |
| wl = u8_u16(word_utf, MAXSWL, word); |
| - // Added to handle wrong encoded UTF-8 strings - jiho@google.com |
| + // NOTE: Added to handle wrong encoded UTF-8 strings |
| if (wl <= 0) { |
| for (int i = 0; i < maxSug; i++) { |
| if (wlst[i]) { |
| ==== //depot//src/parsers/textparser.cxx#2 - /google/src/files/615029530/depot//src/parsers/textparser.cxx ==== |
| --- /google/src/files/50722709/depot//src/parsers/textparser.cxx 2013-08-12 14:06:20.000000000 -0400 |
| +++ /google/src/files/615029530/depot//src/parsers/textparser.cxx 2024-03-12 10:13:27.000000000 -0400 |
| @@ -57,7 +57,7 @@ |
| |
| TextParser::TextParser(unsigned short * wordchars, int len, int text_len) |
| { |
| - // Note(junyangl@google.com): Dynamically allocate space according to text_len |
| + // NOTE: Dynamically allocate space according to text_len |
| // to avoid segfault for too long input. |
| for (int i = 0; i < MAXPREVLINE; i++) { |
| line[i] = (char*)malloc(text_len + 1); |
| @@ -69,7 +69,7 @@ |
| |
| TextParser::~TextParser() |
| { |
| - // Note(junyangl@google.com): Free dynamically allocated space. |
| + // NOTE: Free dynamically allocated space. |
| for (int i = 0; i < MAXPREVLINE; i++) { |
| free(line[i]); |
| } |
| ==== //depot//src/parsers/textparser.hxx#2 - /google/src/files/615029530/depot//src/parsers/textparser.hxx ==== |
| --- /google/src/files/50722709/depot//src/parsers/textparser.hxx 2013-08-12 14:06:20.000000000 -0400 |
| +++ /google/src/files/615029530/depot//src/parsers/textparser.hxx 2024-03-12 10:13:27.000000000 -0400 |
| @@ -29,7 +29,7 @@ |
| void init(const char *); |
| void init(unsigned short * wordchars, int len); |
| int wordcharacters[256]; // for detection of the word boundaries |
| - // Note(junyangl@google.com): Dynamically allocate space for line and urlline |
| + // NOTE: Dynamically allocate space for line and urlline |
| // according to input length, to avoid segfault when the input is too long. |
| char * line[MAXPREVLINE]; // parsed and previous lines |
| char * urlline; // mask for url detection |