diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1998-04-21 18:15:51 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-21 18:15:51 +0000 |
| commit | 5aa8ff620ef68811c5a7dd5d5bbac1c078730a2a (patch) | |
| tree | efd66893a0690109dc0898541cfa6d41b0bf5029 /iconvdata/testdata | |
| parent | 26e119f15e82aa334ad96f74513c4534daf4d35d (diff) | |
| download | glibc-5aa8ff620ef68811c5a7dd5d5bbac1c078730a2a.tar.xz glibc-5aa8ff620ef68811c5a7dd5d5bbac1c078730a2a.zip | |
Update.
1998-04-21 18:00 Ulrich Drepper <drepper@cygnus.com>
* iconv/gconv.c (__gconv): Remove bogus input buffer size computation.
* iconv/gconv_open.c (__gconv_open): Initialize outbufend element.
* iconv/gconv_simple.c (__gconv_transform_internal_ascii): Don't use
character in comparison with uint32_t.
(__gconv_transform_internal_utf8): Specify MAX_NEEDED_TO.
(__gconv_transform_utf8_internal): Specify MAX_NEEDED_FROM.
Optimize BODY a bit.
* iconv/loop.c: Require MIN_NEEDED_INPUT and MIN_NEEDED_OUTPUT to
be defined.
* iconv/skeleton.c: Also reset converted counter in case of an error.
Call reset function using correct value for output buffer start.
* iconvdata/Makefile: Re-enable tests.
* iconvdata/iso8859-1.c: Swap MIN_NEEDED_INPUT and MIN_NEEDED_OUTPUT
value for to-conversion.
* iconvdata/TESTS: Add new third column.
* iconvdata/run-iconv-test.sh: Add support for charsets which are
not ASCII based.
* iconvdata/testdata/suntzus: New file.
* elf/dl-minimal.c (__strtol_internal): Increment pointer to string
while reading. Correctly used base. Little optimization.
(__strtoul_internal): Likewise.
* elf/rtld.c (dl_main): Test to avoid duplicate call of _dl_init_paths
was wrong. Use explicit variable.
1998-04-20 23:49 Zack Weinberg <zack@rabi.phys.columbia.edu>
* configure.in: Check for awk.
* config.make.in: Add AWK to be substituted.
* manual/xtract-typefun.awk: Rewrite to eliminate gawk extensions.
* manual/users.texi: Fix typo exposed by above rewrite.
* Makefile: Invoke awk using AWK variable.
* csu/Makefile: Likewise.
* elf/Makefile: Likewise.
* mach/Makefile: Likewise.
* manual/Makefile: Likewise.
* sysdeps/gnu/Makefile: Likewise.
* sysdeps/mach/hurd/Makefile: Likewise.
* sysdeps/unix/Makefile: Likewise.
* timezone/Makefile: Likewise.
1998-04-10 Gordon Matzigkeit <gord@profitpress.com>
* sysdeps/gnu/errlist.awk (ERR_REMAP): Implement error code to
array index translation.
(SYS_ERRLIST_ALIAS, SYS_NERR_ALIAS): Make weak aliases only if
these are defined.
* sysdeps/mach/hurd/Dist: Add errlist.c to distribution.
* sysdeps/mach/hurd/errlist.c: New file.
(ERR_TRANSLATE): Map Hurd error codes into errlist indices.
(_hurd_errlist): The Hurd error list doesn't have Unix sys_errlist
semantics, so rename it.
1998-04-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* iconvdata/run-iconv-test.sh: Make portable. Always test all
conversions.
1998-04-21 12:30 H.J. Lu <hjl@gnu.org>
* wcsmbs/wcsrtombs.c (__wcsrtombs): Initialize result to 0.
* wcsmbs/wcsnrtombs.c: Likewise.
1998-04-21 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/dl-sysdep.c: Handle _dl_hwcap correctly.
* wcsmbs/btowc.c (__btowc): Declare inptr as const char *.
* time/strftime.c (my_strftime): Initialize pad variable in
declaration.
* iconvdata/big5.c: Don't use character constants in comparisons
with unsigned value.
* sysdeps/generic/setutxent.c: New file.
* sysdeps/generic/getutxent.c: New file.
* sysdeps/generic/endutxent.c: New file.
* sysdeps/generic/getutxid.c: New file.
* sysdeps/generic/getutxline.c: New file.
* sysdeps/generic/pututxline.c: New file.
* sysdeps/generic/utmpxname.c: New file.
* sysdeps/generic/updwtmpx.c: New file.
Diffstat (limited to 'iconvdata/testdata')
| -rw-r--r-- | iconvdata/testdata/suntzus | 1693 |
1 files changed, 1693 insertions, 0 deletions
diff --git a/iconvdata/testdata/suntzus b/iconvdata/testdata/suntzus new file mode 100644 index 0000000000..4432c05674 --- /dev/null +++ b/iconvdata/testdata/suntzus @@ -0,0 +1,1693 @@ +
+
+
+
+ SUN TZU ON THE ART OF WAR
+ THE OLDEST MILITARY TREATISE IN THE WORLD
+
+ Translated from the Chinese
+ By LIONEL GILES, M.A. (1910)
+
+
+
+[This is the basic text of Sun Tzu on the Art of War. It was
+extracted from Mr. Giles' complete work as titled above. The
+commentary itself, which, of course includes this work embedded
+within it, has been released as suntzu10.txt (or suntzu10.zip).
+This is being released only as an adjunct to that work, which
+contains a wealth of commentary upon this text.]
+
+
+
+
+I. LAYING PLANS
+
+
+ 1. Sun Tzu said: The art of war is of vital importance
+ to the State.
+
+ 2. It is a matter of life and death, a road either
+ to safety or to ruin. Hence it is a subject of inquiry
+ which can on no account be neglected.
+
+ 3. The art of war, then, is governed by five constant
+ factors, to be taken into account in one's deliberations,
+ when seeking to determine the conditions obtaining in the field.
+
+ 4. These are: (1) The Moral Law; (2) Heaven; (3) Earth;
+ (4) The Commander; (5) Method and discipline.
+
+5,6. The Moral Law causes the people to be in complete
+ accord with their ruler, so that they will follow him
+ regardless of their lives, undismayed by any danger.
+
+ 7. Heaven signifies night and day, cold and heat,
+ times and seasons.
+
+ 8. Earth comprises distances, great and small;
+ danger and security; open ground and narrow passes;
+ the chances of life and death.
+
+ 9. The Commander stands for the virtues of wisdom,
+ sincerely, benevolence, courage and strictness.
+
+10. By method and discipline are to be understood
+ the marshaling of the army in its proper subdivisions,
+ the graduations of rank among the officers, the maintenance
+ of roads by which supplies may reach the army, and the
+ control of military expenditure.
+
+11. These five heads should be familiar to every general:
+ he who knows them will be victorious; he who knows them
+ not will fail.
+
+12. Therefore, in your deliberations, when seeking
+ to determine the military conditions, let them be made
+ the basis of a comparison, in this wise:--
+
+13. (1) Which of the two sovereigns is imbued
+ with the Moral law?
+ (2) Which of the two generals has most ability?
+ (3) With whom lie the advantages derived from Heaven
+ and Earth?
+ (4) On which side is discipline most rigorously enforced?
+ (5) Which army is stronger?
+ (6) On which side are officers and men more highly trained?
+ (7) In which army is there the greater constancy
+ both in reward and punishment?
+
+14. By means of these seven considerations I can
+ forecast victory or defeat.
+
+15. The general that hearkens to my counsel and acts
+ upon it, will conquer: let such a one be retained in command!
+ The general that hearkens not to my counsel nor acts upon it,
+ will suffer defeat:--let such a one be dismissed!
+
+16. While heading the profit of my counsel,
+ avail yourself also of any helpful circumstances
+ over and beyond the ordinary rules.
+
+17. According as circumstances are favorable,
+ one should modify one's plans.
+
+18. All warfare is based on deception.
+
+19. Hence, when able to attack, we must seem unable;
+ when using our forces, we must seem inactive; when we
+ are near, we must make the enemy believe we are far away;
+ when far away, we must make him believe we are near.
+
+20. Hold out baits to entice the enemy. Feign disorder,
+ and crush him.
+
+21. If he is secure at all points, be prepared for him.
+ If he is in superior strength, evade him.
+
+22. If your opponent is of choleric temper, seek to
+ irritate him. Pretend to be weak, that he may grow arrogant.
+
+23. If he is taking his ease, give him no rest.
+ If his forces are united, separate them.
+
+24. Attack him where he is unprepared, appear where
+ you are not expected.
+
+25. These military devices, leading to victory,
+ must not be divulged beforehand.
+
+26. Now the general who wins a battle makes many
+ calculations in his temple ere the battle is fought.
+ The general who loses a battle makes but few
+ calculations beforehand. Thus do many calculations
+ lead to victory, and few calculations to defeat:
+ how much more no calculation at all! It is by attention
+ to this point that I can foresee who is likely to win or lose.
+
+
+II. WAGING WAR
+
+
+ 1. Sun Tzu said: In the operations of war,
+ where there are in the field a thousand swift chariots,
+ as many heavy chariots, and a hundred thousand
+ mail-clad soldiers, with provisions enough to carry them
+ a thousand li, the expenditure at home and at the front,
+ including entertainment of guests, small items such as
+ glue and paint, and sums spent on chariots and armor,
+ will reach the total of a thousand ounces of silver per day.
+ Such is the cost of raising an army of 100,000 men.
+
+ 2. When you engage in actual fighting, if victory
+ is long in coming, then men's weapons will grow dull and
+ their ardor will be damped. If you lay siege to a town,
+ you will exhaust your strength.
+ 3. Again, if the campaign is protracted, the resources
+ of the State will not be equal to the strain.
+
+ 4. Now, when your weapons are dulled, your ardor damped,
+ your strength exhausted and your treasure spent,
+ other chieftains will spring up to take advantage
+ of your extremity. Then no man, however wise,
+ will be able to avert the consequences that must ensue.
+
+ 5. Thus, though we have heard of stupid haste in war,
+ cleverness has never been seen associated with long delays.
+
+ 6. There is no instance of a country having benefited
+ from prolonged warfare.
+
+ 7. It is only one who is thoroughly acquainted
+ with the evils of war that can thoroughly understand
+ the profitable way of carrying it on.
+
+ 8. The skillful soldier does not raise a second levy,
+ neither are his supply-wagons loaded more than twice.
+
+ 9. Bring war material with you from home, but forage
+ on the enemy. Thus the army will have food enough
+ for its needs.
+
+10. Poverty of the State exchequer causes an army
+ to be maintained by contributions from a distance.
+ Contributing to maintain an army at a distance causes
+ the people to be impoverished.
+
+11. On the other hand, the proximity of an army causes
+ prices to go up; and high prices cause the people's
+ substance to be drained away.
+
+12. When their substance is drained away, the peasantry
+ will be afflicted by heavy exactions.
+
+13,14. With this loss of substance and exhaustion
+ of strength, the homes of the people will be stripped bare,
+ and three-tenths of their income will be dissipated;
+ while government expenses for broken chariots, worn-out horses,
+ breast-plates and helmets, bows and arrows, spears and shields,
+ protective mantles, draught-oxen and heavy wagons,
+ will amount to four-tenths of its total revenue.
+
+15. Hence a wise general makes a point of foraging
+ on the enemy. One cartload of the enemy's provisions
+ is equivalent to twenty of one's own, and likewise
+ a single picul of his provender is equivalent to twenty
+ from one's own store.
+
+16. Now in order to kill the enemy, our men must
+ be roused to anger; that there may be advantage from
+ defeating the enemy, they must have their rewards.
+
+17. Therefore in chariot fighting, when ten or more chariots
+ have been taken, those should be rewarded who took the first.
+ Our own flags should be substituted for those of the enemy,
+ and the chariots mingled and used in conjunction with ours.
+ The captured soldiers should be kindly treated and kept.
+
+18. This is called, using the conquered foe to augment
+ one's own strength.
+
+19. In war, then, let your great object be victory,
+ not lengthy campaigns.
+
+20. Thus it may be known that the leader of armies
+ is the arbiter of the people's fate, the man on whom it
+ depends whether the nation shall be in peace or in peril.
+
+
+III. ATTACK BY STRATAGEM
+
+
+ 1. Sun Tzu said: In the practical art of war, the best
+ thing of all is to take the enemy's country whole and intact;
+ to shatter and destroy it is not so good. So, too, it is
+ better to recapture an army entire than to destroy it,
+ to capture a regiment, a detachment or a company entire
+ than to destroy them.
+
+ 2. Hence to fight and conquer in all your battles
+ is not supreme excellence; supreme excellence consists
+ in breaking the enemy's resistance without fighting.
+
+ 3. Thus the highest form of generalship is to
+ balk the enemy's plans; the next best is to prevent
+ the junction of the enemy's forces; the next in
+ order is to attack the enemy's army in the field;
+ and the worst policy of all is to besiege walled cities.
+
+ 4. The rule is, not to besiege walled cities if it
+ can possibly be avoided. The preparation of mantlets,
+ movable shelters, and various implements of war, will take
+ up three whole months; and the piling up of mounds over
+ against the walls will take three months more.
+
+ 5. The general, unable to control his irritation,
+ will launch his men to the assault like swarming ants,
+ with the result that one-third of his men are slain,
+ while the town still remains untaken. Such are the disastrous
+ effects of a siege.
+
+ 6. Therefore the skillful leader subdues the enemy's
+ troops without any fighting; he captures their cities
+ without laying siege to them; he overthrows their kingdom
+ without lengthy operations in the field.
+
+ 7. With his forces intact he will dispute the mastery
+ of the Empire, and thus, without losing a man, his triumph
+ will be complete. This is the method of attacking by stratagem.
+
+ 8. It is the rule in war, if our forces are ten
+ to the enemy's one, to surround him; if five to one,
+ to attack him; if twice as numerous, to divide our army
+ into two.
+
+ 9. If equally matched, we can offer battle;
+ if slightly inferior in numbers, we can avoid the enemy;
+ if quite unequal in every way, we can flee from him.
+
+10. Hence, though an obstinate fight may be made
+ by a small force, in the end it must be captured
+ by the larger force.
+
+11. Now the general is the bulwark of the State;
+ if the bulwark is complete at all points; the State will
+ be strong; if the bulwark is defective, the State will
+ be weak.
+
+12. There are three ways in which a ruler can bring
+ misfortune upon his army:--
+
+13. (1) By commanding the army to advance or to retreat,
+ being ignorant of the fact that it cannot obey.
+ This is called hobbling the army.
+
+14. (2) By attempting to govern an army in the
+ same way as he administers a kingdom, being ignorant
+ of the conditions which obtain in an army. This causes
+ restlessness in the soldier's minds.
+
+15. (3) By employing the officers of his army
+ without discrimination, through ignorance of the
+ military principle of adaptation to circumstances.
+ This shakes the confidence of the soldiers.
+
+16. But when the army is restless and distrustful,
+ trouble is sure to come from the other feudal princes.
+ This is simply bringing anarchy into the army, and flinging
+ victory away.
+
+17. Thus we may know that there are five essentials
+ for victory:
+ (1) He will win who knows when to fight and when
+ not to fight.
+ (2) He will win who knows how to handle both superior
+ and inferior forces.
+ (3) He will win whose army is animated by the same
+ spirit throughout all its ranks.
+ (4) He will win who, prepared himself, waits to take
+ the enemy unprepared.
+ (5) He will win who has military capacity and is
+ not interfered with by the sovereign.
+
+18. Hence the saying: If you know the enemy
+ and know yourself, you need not fear the result of a
+ hundred battles. If you know yourself but not the enemy,
+ for every victory gained you will also suffer a defeat.
+ If you know neither the enemy nor yourself, you will
+ succumb in every battle.
+
+
+IV. TACTICAL DISPOSITIONS
+
+
+ 1. Sun Tzu said: The good fighters of old first put
+ themselves beyond the possibility of defeat, and then
+ waited for an opportunity of defeating the enemy.
+
+ 2. To secure ourselves against defeat lies in our
+ own hands, but the opportunity of defeating the enemy
+ is provided by the enemy himself.
+ 3. Thus the good fighter is able to secure himself against defeat,
+ but cannot make certain of defeating the enemy.
+
+ 4. Hence the saying: One may know how to conquer
+ without being able to do it.
+
+ 5. Security against defeat implies defensive tactics;
+ ability to defeat the enemy means taking the offensive.
+
+ 6. Standing on the defensive indicates insufficient
+ strength; attacking, a superabundance of strength.
+
+ 7. The general who is skilled in defense hides in the
+ most secret recesses of the earth; he who is skilled in
+ attack flashes forth from the topmost heights of heaven.
+ Thus on the one hand we have ability to protect ourselves;
+ on the other, a victory that is complete.
+
+ 8. To see victory only when it is within the ken
+ of the common herd is not the acme of excellence.
+
+ 9. Neither is it the acme of excellence if you fight
+ and conquer and the whole Empire says, "Well done!"
+
+10. To lift an autumn hair is no sign of great strength;
+ to see the sun and moon is no sign of sharp sight;
+ to hear the noise of thunder is no sign of a quick ear.
+
+11. What the ancients called a clever fighter is
+ one who not only wins, but excels in winning with ease.
+
+12. Hence his victories bring him neither reputation
+ for wisdom nor credit for courage.
+
+13. He wins his battles by making no mistakes.
+ Making no mistakes is what establishes the certainty
+ of victory, for it means conquering an enemy that is
+ already defeated.
+
+14. Hence the skillful fighter puts himself into
+ a position which makes defeat impossible, and does
+ not miss the moment for defeating the enemy.
+
+15. Thus it is that in war the victorious strategist
+ only seeks battle after the victory has been won,
+ whereas he who is destined to defeat first fights
+ and afterwards looks for victory.
+
+16. The consummate leader cultivates the moral law,
+ and strictly adheres to method and discipline; thus it is
+ in his power to control success.
+
+17. In respect of military method, we have,
+ firstly, Measurement; secondly, Estimation of quantity;
+ thirdly, Calculation; fourthly, Balancing of chances;
+ fifthly, Victory.
+
+18. Measurement owes its existence to Earth;
+ Estimation of quantity to Measurement; Calculation to
+ Estimation of quantity; Balancing of chances to Calculation;
+ and Victory to Balancing of chances.
+
+19. A victorious army opposed to a routed one, is as
+ a pound's weight placed in the scale against a single grain.
+
+20. The onrush of a conquering force is like the bursting
+ of pent-up waters into a chasm a thousand fathoms deep.
+
+
+V. ENERGY
+
+
+ 1. Sun Tzu said: The control of a large force
+ is the same principle as the control of a few men:
+ it is merely a question of dividing up their numbers.
+
+ 2. Fighting with a large army under your command
+ is nowise different from fighting with a small one:
+ it is merely a question of instituting signs and signals.
+
+ 3. To ensure that your whole host may withstand
+ the brunt of the enemy's attack and remain unshaken--
+ this is effected by maneuvers direct and indirect.
+
+ 4. That the impact of your army may be like a grindstone
+ dashed against an egg--this is effected by the science
+ of weak points and strong.
+
+ 5. In all fighting, the direct method may be used
+ for joining battle, but indirect methods will be needed
+ in order to secure victory.
+
+ 6. Indirect tactics, efficiently applied, are inexhaustible
+ as Heaven and Earth, unending as the flow of rivers and streams;
+ like the sun and moon, they end but to begin anew;
+ like the four seasons, they pass away to return once more.
+
+ 7. There are not more than five musical notes,
+ yet the combinations of these five give rise to more
+ melodies than can ever be heard.
+
+ 8. There are not more than five primary colors
+ (blue, yellow, red, white, and black), yet in combination
+ they produce more hues than can ever been seen.
+
+ 9. There are not more than five cardinal tastes
+ (sour, acrid, salt, sweet, bitter), yet combinations
+ of them yield more flavors than can ever be tasted.
+
+10. In battle, there are not more than two methods
+ of attack--the direct and the indirect; yet these two
+ in combination give rise to an endless series of maneuvers.
+
+11. The direct and the indirect lead on to each other in turn.
+ It is like moving in a circle--you never come to an end.
+ Who can exhaust the possibilities of their combination?
+
+12. The onset of troops is like the rush of a torrent
+ which will even roll stones along in its course.
+
+13. The quality of decision is like the well-timed
+ swoop of a falcon which enables it to strike and destroy
+ its victim.
+
+14. Therefore the good fighter will be terrible
+ in his onset, and prompt in his decision.
+
+15. Energy may be likened to the bending of a crossbow;
+ decision, to the releasing of a trigger.
+
+16. Amid the turmoil and tumult of battle, there may
+ be seeming disorder and yet no real disorder at all;
+ amid confusion and chaos, your array may be without head
+ or tail, yet it will be proof against defeat.
+
+17. Simulated disorder postulates perfect discipline,
+ simulated fear postulates courage; simulated weakness
+ postulates strength.
+
+18. Hiding order beneath the cloak of disorder is
+ simply a question of subdivision; concealing courage under
+ a show of timidity presupposes a fund of latent energy;
+ masking strength with weakness is to be effected
+ by tactical dispositions.
+
+19. Thus one who is skillful at keeping the enemy
+ on the move maintains deceitful appearances, according to
+ which the enemy will act. He sacrifices something,
+ that the enemy may snatch at it.
+
+20. By holding out baits, he keeps him on the march;
+ then with a body of picked men he lies in wait for him.
+
+21. The clever combatant looks to the effect of combined
+ energy, and does not require too much from individuals.
+ Hence his ability to pick out the right men and utilize
+ combined energy.
+
+22. When he utilizes combined energy, his fighting
+ men become as it were like unto rolling logs or stones.
+ For it is the nature of a log or stone to remain
+ motionless on level ground, and to move when on a slope;
+ if four-cornered, to come to a standstill, but if
+ round-shaped, to go rolling down.
+
+23. Thus the energy developed by good fighting men
+ is as the momentum of a round stone rolled down a mountain
+ thousands of feet in height. So much on the subject
+ of energy.
+
+
+VI. WEAK POINTS AND STRONG
+
+
+ 1. Sun Tzu said: Whoever is first in the field and
+ awaits the coming of the enemy, will be fresh for the fight;
+ whoever is second in the field and has to hasten to battle
+ will arrive exhausted.
+
+ 2. Therefore the clever combatant imposes his will on
+ the enemy, but does not allow the enemy's will to be imposed on him.
+
+ 3. By holding out advantages to him, he can cause the enemy
+ to approach of his own accord; or, by inflicting damage,
+ he can make it impossible for the enemy to draw near.
+
+ 4. If the enemy is taking his ease, he can harass him;
+ if well supplied with food, he can starve him out;
+ if quietly encamped, he can force him to move.
+
+ 5. Appear at points which the enemy must hasten to defend;
+ march swiftly to places where you are not expected.
+
+ 6. An army may march great distances without distress,
+ if it marches through country where the enemy is not.
+
+ 7. You can be sure of succeeding in your attacks
+ if you only attack places which are undefended.You can
+ ensure the safety of your defense if you only hold
+ positions that cannot be attacked.
+
+ 8. Hence that general is skillful in attack whose
+ opponent does not know what to defend; and he is skillful
+ in defense whose opponent does not know what to attack.
+
+ 9. O divine art of subtlety and secrecy! Through you
+ we learn to be invisible, through you inaudible;
+ and hence we can hold the enemy's fate in our hands.
+
+10. You may advance and be absolutely irresistible,
+ if you make for the enemy's weak points; you may retire
+ and be safe from pursuit if your movements are more rapid
+ than those of the enemy.
+
+11. If we wish to fight, the enemy can be forced
+ to an engagement even though he be sheltered behind a high
+ rampart and a deep ditch. All we need do is attack
+ some other place that he will be obliged to relieve.
+
+12. If we do not wish to fight, we can prevent
+ the enemy from engaging us even though the lines
+ of our encampment be merely traced out on the ground.
+ All we need do is to throw something odd and unaccountable
+ in his way.
+
+13. By discovering the enemy's dispositions and remaining
+ invisible ourselves, we can keep our forces concentrated,
+ while the enemy's must be divided.
+
+14. We can form a single united body, while the
+ enemy must split up into fractions. Hence there will
+ be a whole pitted against separate parts of a whole,
+ which means that we shall be many to the enemy's few.
+
+15. And if we are able thus to attack an inferior force
+ with a superior one, our opponents will be in dire straits.
+
|
