Closed Bug 221666 Opened 21 years ago Closed 21 years ago

remove redundant copies of nsCompressedCharMap.* and move them into intl/unicharutil

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jshin1987, Assigned: jshin1987)

References

Details

(Keywords: intl)

Attachments

(1 file, 2 obsolete files)

Two copies of nsCompressedCharMap.(cpp|h) are present in the tree, one in gfx/src(gfx/public) and the other in gfx/src/shared, one of which has to be deleted. Moreover, to avoid making 'intl' depend on 'gfx' (see bug 221024), we have to move them out of gfx and into intl/unicharutil
Attached patch patch (obsolete) — Splinter Review
In addition to the above patch, gfx/src/nsCompressedCharMap.cpp and gfx/public/nsCompressedCharMap.h have to be moved to intl/unicharutils/src and intl/unicharutils/public, respecitvely. Besides, gfx/src/shared/nsCompressedCharMap.* have to be deleted (The references to two files in Makefile.in in that directory were removed a long time ago).
Comment on attachment 132916 [details] [diff] [review] patch This is a tree cleanup plus a bit of reorganization
Attachment #132916 - Flags: superreview?(blizzard)
Attachment #132916 - Flags: review?(smontagu)
Comment on attachment 132916 [details] [diff] [review] patch This doesn't work because there are several 'extern's declared in nsCompressedCharMap.h.
Attachment #132916 - Flags: superreview?(blizzard)
Attachment #132916 - Flags: review?(smontagu)
Attached patch patch v2a (obsolete) — Splinter Review
To avoid making 'intl' depend on gfx, I split nsCompressedCharMap.h into two parts, one with macros for accessing nsCompressCharMap(used outside gfx) and the other with nsCompressCharMap class definition and utility functions (used only in gfx) to hanld nsCompressCharMap. The former is put in intl/unicharutil (nsCCMapDefines.h) and the latter is left where it's now(gfx/public).
Attachment #132916 - Attachment is obsolete: true
Moving nsCompressedCharMap.* out of gfx appears to be an unnecessary hassle. Instead, I just want to remove(cvs delete) the unused copy of nsCompressedCharMap.* in gfx/shared/src. No cvs surgery is necessary because gfx/src and gfx/public have them (more updated ones). Because the patch would be only made up of lines beginning with '-', I'm not gonna upload it. smontagu and blizzard, can you mark your 'endorsement' here, instead (if necessary)?
No longer blocks: 221024
Status: NEW → ASSIGNED
Summary: remove redundant copies of nsCompressedCharMap.* and move one copy to intl out of gfx → remove redundant copies of nsCompressedCharMap.*
r=smontagu for the cvs remove.
> Two copies of nsCompressedCharMap.cpp There are _three_ copies :-( Another one gets copied in gfx/src/windows. I don't quite get it why you couldn't get attachment 132916 [details] [diff] [review] to work. It looks so mcuh neater. What happens if you remove s/extern//g ?
... or by pushing them as |static| helpers inside nsCompressCharMap.
> What happens if you remove s/extern//g With those replacements, C++ files wouldn't get even compiled, would they? Only declaration but no definition.. > pushing them as |static| helpers inside nsCompressCharMap That should work except that I have to go around to change a dozen or so files. I'd do that if there's a guarantted that I can get a quick review :-) Some of my large patches took almost a year to get in ...
>a quick review I have had some misgivings about these multiple copies for a while. If your patch doesn't change the functionality, I will give you a quick review.
I mistakenly thought that functions defined in intl/unicharutils/(src|public) would be available if 'unicharutil' is added to REQUIRED list in Makefile.in. It turned out that they're only for nsCOM-ified methods. I didn't realized it until I looked into unicharutil_s.lib for CCMap-related funtions. None of them was there (that's why I got the link error). By moving nsCompressedCharMap.* into intl/unicharutils/util (files of which get compiled into unicharutil_s.lib), I was able to go through the link w/o a problem. In short, rbs was right. I don't need any mass-change at all. Just moving nsCompressedCharMap.* into intl/unicharutils/util works.
Summary: remove redundant copies of nsCompressedCharMap.* → remove redundant copies of nsCompressedCharMap.* and move them into intl/unicharutil
Attached patch a new patchSplinter Review
In addition to this patch, nsCompressedCharMap.* under gfx (two copies) have to be cvs-removed (the third copy mentioned by rbs is generated at the compile time and the necessary changes for Makefile.in's are included in the patch). Moreover, the newer of two copies (in gfx/src and gfx/public) have to be moved to intl/unicharutil/util. BTW, who would be a 'CVS surgeon' to preserve the revision history after this move?
Attachment #132925 - Attachment is obsolete: true
Comment on attachment 133854 [details] [diff] [review] a new patch Asking for r/sr. Here's the summary of the additional file movement for review. 1. delete gfx/shared/nsCompressedCharMap.* 2. move gfx/public/nsCompressedCharMap.h and gfx/src/nsCompressedCharMap.cpp to intl/unicharutil/util
Attachment #133854 - Flags: superreview?(rbs)
Attachment #133854 - Flags: review?(smontagu)
Comment on attachment 133854 [details] [diff] [review] a new patch r=smontagu.
Attachment #133854 - Flags: review?(smontagu) → review+
> BTW, who would be a 'CVS surgeon' to preserve the revision history after this > move? Cc:ing leaf@mozilla.org for help with this. leaf, care to chime in?
Comment on attachment 133854 [details] [diff] [review] a new patch sr=rbs
Attachment #133854 - Flags: superreview?(rbs) → superreview+
Blocks: 221024
thanks for r/sr. To leaf, what should I do about files I'm gonna move? Can I check in first at the new location or do you have to move files doing the cvs surgery?
Just to make extra sure i'm doing the right thing: gfx/public/nsCompressedCharMap.h -> intl/unicharutil/util/nsCompressedCharMap.h gfx/src/nsCompressedCharMap.cpp -> intl/unicharutil/util/nsCompressedCharMap.cpp Meaning, no "public" and "src" directories under "util". I'll make the copy when i get confirmation that this is what you're looking for. Once i perform the copy, you can cvs remove the old file locations at your leisure.
leaf, thanks for your help. What you wrote is exactly what I want. There's no 'src/public' directory at the path of the new location.
ping leaf. Have you scheduled your operation? :-)
fix checked into the trunk with the cvs operation done by brendan.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 194823 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: