Fixed some things in wrap.awk: - GitHub-style code blocks are now supported. - Lists starting with '-' characters were confused with headers - Footnotes are passed through verbatim - Forced linebreaks (spaces at EOL) work now

--- wrap.awk
+++ wrap.awk
@@ -6,7 +6,7 @@
 BEGIN { if(!Width) Width = 80; }

 # Preserve headings
-/^[[:space:]]*(=|-)+/ {
+/^[[:space:]]*[=\-][=\-][=\-]+/ {
     if(Buf)
         Out = Out Buf "\n" $0 "\n";
     else
@@ -16,7 +16,20 @@
 }

 # Preformatted text is sent to the output verbatim
-/^(    |\t)+/ && match(last,/^[[:space:]]*$/) {
+# Ditto for links/abbreviations
+/^(    |\t)+/ && match(last,/^[[:space:]]*$/) || /^[[:space:]]*\*?\[.*\]:/ {
+    Out = Out $0 "\n";
+    next;
+}
+
+# GitHub-style ``` code blocks:
+/^```/ {
+    Out = Out Buf "\n" $0 "\n";
+    Buf = "";
+    Code = !Code;
+    next;
+}
+Code {
     Out = Out $0 "\n";
     next;
 }
@@ -57,10 +70,11 @@

     # Trim leading whitespace
     str = substr(str, RLENGTH+1);
+    gsub(/\r/, "", str); # Windows :(

     # Lines starting with list item characters
     # force a line break in the output
-    if(match(str,/^([*+-]|[[:digit:]]\.)/)) {
+    if(match(str,/^([*+\-]|[[:digit:]]+\.)/)) {
         if(Buf) Out = Out Buf "\n";
         Buf = "";
         # Preserve the indentation in the global Indent
@@ -88,23 +102,28 @@
         n = RSTART+RLENGTH;

         # Handle forced line breaks
-        if(match(str,/(  |[[:space:]]+\\)$/)) {
-            Out = Out str "\n";
-            n = RSTART+RLENGTH;
-        } else {
-            # If the buffer + the word exceeds the allowed width
-            # then insert a line break. Otherwise, just append the
-            # word to the buffer.
-            # Also, preserve the indentation.
-            if(length(Buf) + length(word) + 1 >= Width) {
-                Out = Out Buf "\n";
-                if(InList) indent = Indent "  ";
-                Buf = indent word;
-            } else if(length(Buf))
-                Buf = Buf " " word;
+        if(match(str,/(  |[[:space:]]+\\)$/) == loc) {
+            if(length(Buf) + length(str) + 1 >= Width)
+                Out = Out Buf "\n" indent str "\n" indent;
             else
-                Buf = indent word;
+                Out = Out Buf " " str "\n" indent;
+            Buf = "";
+            return;
         }
+
+        # If the buffer + the word exceeds the allowed width
+        # then insert a line break. Otherwise, just append the
+        # word to the buffer.
+        # Also, preserve the indentation.
+        if(length(Buf) + length(word) + 1 >= Width) {
+            Out = Out Buf "\n";
+            if(InList) indent = Indent "  ";
+            Buf = indent word;
+        } else if(length(Buf))
+            Buf = Buf " " word;
+        else
+            Buf = indent word;
+
         str = substr(str, n);
         loc = match(str, /[[:space:]]+/);
     }


TestLanguages: fix test

TestLanguages: fix test

--- test/TestLanguages.awk
+++ test/TestLanguages.awk
@@ -6,6 +6,8 @@
     T("getCode()", 5)
     {
         initLocale()
+        initLocaleAlias()
+        initLocaleDisplay()

         assertEqual(getCode("chinese"), "zh-CN")
         assertEqual(getCode("简体中文"), "zh-CN")


prints output on only one node now for util_version.F

--- src/util/ids.awk
+++ src/util/ids.awk
@@ -6,11 +6,13 @@
 # module name -> produce a write statement for the module name
 # other       -> produce nothing
 #
-# $Id: ids.awk,v 1.3 1995-02-02 20:21:59 d3g681 Exp $
+# $Id: ids.awk,v 1.4 1997-07-15 19:52:52 d3e129 Exp $

 BEGIN {
 		underline = "---------------------------------------------------------";
 		printf("      subroutine util_version\n");
+                printf("#include \"global.fh\"\n");
+                printf("      if (ga_nodeid().eq.0) then\n");
 		printf("      write(6,*)\n");
 		printf("      write(6,*) ' Software version information'\n");
 		printf("      write(6,*) ' ----------------------------'\n");
@@ -34,6 +36,8 @@
 END {
 		printf("      write(6,*)\n");
 		printf("      call util_flush(6)\n");
+                printf("      endif\n");
+                printf("      call ga_sync()\n");
 		printf("      end\n");
 }


remove unused file

remove unused file

--- trunk/JLanguageTool/src/resource/en/filter_infl.awk
+++ trunk/JLanguageTool/src/resource/en/filter_infl.awk
@@ -1,1621 +0,0 @@
-BEGIN {IGNORECASE=1}
-!/^(abdominal N:|aberrant N:|abnormal N:|absurd N:|acoustic N:|\
-actual N:|after N|acupuncture V:|adipose N:|adulterate A:|adz V:|\
-adze V:|aesthetic N:|afar N:|afferent N:|affiance N:|affluent N:|\
-affray V:|aforethought N:|ageing N:|agent V:|airfreight V:|alligator V:|\
-allover N:|allowance V:|alpha A:|altogether N:|aluminum A:|ambient N:|\
-ambition V:|amen N:|amok N:|amuck N:|anagram V:|angel V:|anneal N:|\
-antedate N:|antediluvian N:|anthem V:|antiaircraft N:|antidote V:|\
-antimalarial N:|antimicrobial N:|antimissile N:|antislavery N:|apical N:|\
-apoplectic N:|appurtenant N:|apron V:|arable N:|arbitrary N:|arcade V:|\
-architect V:|armorial N:|arrow V:|arterial N:|article V:|aseptic N:|ashlar V:|\
-aspen A:|asphalt A:|asteroid A:|astigmatic N:|auctioneer V:|audiovisual N:|\
-auditory N:|augment N:|augmentative N:|auricular N:|austral N:|autoclave V:|\
-avalanche V:|awol N:|backdrop V:|backgammon V:|background V:|backlash V:|\
-backwash V:|badge V:|badinage V:|bagpipe V:|bailout A:|baize V:|baksheesh V:|\
-bandy N:|bard V:|barn V:|basset V:|baste N:|bate N:|bath V:|batik V:|\
-battledore V:|bawdy N:|beacon V:|beau V:|beck V:|beckon N:|beeswax V:|\
-beg N:|begum V:|belay N:|benchmark V:|benefice V:|berserk N:|between N:|\
-bib V:|big V:|bight V:|bilge V:|bilk N:|billboard V:|biologic N:|biological N:|\
-birdlime V:|bishop V:|bit V:|bitter V:|bivalent N:|blabber N:|blackbird V:|\
-blackguard V:|bleak N:|blear V:|bleed N:|blinding N:|blip V:|blitzkrieg V:|\
-bloat N:|blubber A:|blurb V:|bobtail A:|bobtail V:|body V:|boldface V:|\
-bolt A:|bombard N:|bond A:|bone A:|bonnet V:|bonnie N:|bonny N:|\
-boodle V:|boring N:|bosom V:|bossy N:|botanical N:|bottleneck V:|\
-bowel V:|bower V:|bowstring V:|bracing N:|brad V:|brag A:|braille V:|\
-bramble V:|bran V:|brander V:|brandish N:|brash N:|brassy N:|bravo V:|\
-breadboard V:|bream V:|breech V:|brigade V:|brine V:|briny N:|briquet V:|\
-briquette V:|brittle V:|broom V:|bruit N:|brute V:|buckler V:|buckram V:|\
-buddy A:|buddy V:|budge N:|bullet V:|bulwark V:|bumble N:|bumper V:|\
-bung A:|bunker V:|bunko V:|bur V:|burgeon N:|burl V:|but A:|burning N:|\
-bush A:|byline V:|cabal V:|cabbage V:|cabin V:|cadence V:|cadge N:|\
-cakewalk V:|caller A:|callow N:|caloric N:|cam V:|came N:|canal V:|\
-canary A:|cancel N:|candid N:|candidate V:|cannonball A:|cant A:|\
-canton V:|cape V:|car A:|caravan V:|carcass V:|\
-cardiac N:|\
-careen N:|\
-carhop V:|\
-carny A:|\
-carny V:|\
-carton V:|\
-cask V:|\
-casket V:|\
-castrate N:|\
-cat V:|\
-catchpenny N:|\
-cathedral A:|\
-catty N:|\
-causative N:|\
-causeway V:|\
-cavalier V:|\
-cavern V:|\
-celestial N:|\
-cellar V:|\
-centrifugal N:|\
-cerebral N:|\
-chafe N:|\
-chairman V:|\
-chamber V:|\
-chammy V:|\
-chamois V:|\
-chapel V:|\
-chapter V:|\
-character V:|\
-charcoal V:|\
-chariot V:|\
-chartreuse A:|\
-cheap N:|\
-checkerboard V:|\
-chicane V:|\
-chimney V:|\
-chine V:|\
-chipper V:|\
-choir V:|\
-chord V:|\
-choroid A:|\
-chose N:|\
-chump V:|\
-chunk V:|\
-church V:|\
-chute V:|\
-cincture V:|\
-circumflex A:|\
-circumflex V:|\
-clad V:|\
-clangor V:|\
-clangour V:|\
-clay V:|\
-cleat V:|\
-clerical N:|\
-clinker V:|\
-clique V:|\
-closure V:|\
-cloture V:|\
-cnidarian A:|\
-coagulate A:|\
-cobweb V:|\
-cockfighting A:|\
-cockle V:|\
-cocktail V:|\
-cocky N:|\
-coelenterate A:|\
-coffeehouse V:|\
-coffer V:|\
-cog V:|\
-collage V:|\
-collegiate N:|\
-colloid A:|\
-columbine A:|\
-commemorative N:|\
-commie A:|\
-communicant A:|\
-companion V:|\
-company V:|\
-compartment V:|\
-compassion V:|\
-compassionate V:|\
-compeer V:|\
-complementary N:|\
-complex V:|\
-complicate A:|\
-composite V:|\
-compulsive N:|\
-compute N:|\
-concave V:|\
-conceit V:|\
-concessionary N:|\
-concurrent N:|\
-cone V:|\
-confection V:|\
-conference V:|\
-confident N:|\
-confiscate A:|\
-confluent N:|\
-congregate A:|\
-congress V:|\
-conjugate N:|\
-consecrate A:|\
-consequent N:|\
-conservatory A:|\
-considerable N:|\
-constabulary A:|\
-construe N:|\
-contaminate A:|\
-contradictory N:|\
-contralto A:|\
-contributory N:|\
-convict A:|\
-copper V:|\
-corbel V:|\
-corduroy V:|\
-cornice V:|\
-corroborate A:|\
-corrugate A:|\
-cosset N:|\
-cosy V:|\
-cote V:|\
-cotter V:|\
-counterpoint V:|\
-counterweight V:|\
-coup V:|\
-courtesy V:|\
-cove V:|\
-cowhide V:|\
-cowl V:|\
-coy V:|\
-cozy V:|\
-cram N:|\
-crape V:|\
-craven V:|\
-crawfish V:|\
-credential A:|\
-credential V:|\
-crenelate A:|\
-crenellate A:|\
-crepe V:|\
-crescendo V:|\
-crevasse V:|\
-cricket V:|\
-crock V:|\
-croquet V:|\
-crossbred N:|\
-crosshatch N:|\
-crosstown N:|\
-crowbar V:|\
-crowning N:|\
-crud V:|\
-crummy N:|\
-crutch V:|\
-crystal V:|\
-cub V:|\
-cubic N:|\
-cuckoo V:|\
-cumber N:|\
-curd V:|\
-custodial N:|\
-customary N:|\
-cyanide V:|\
-cyclical N:|\
-cylinder V:|\
-cynic A:|\
-dado V:|\
-dagger V:|\
-damndest N:|\
-damnedest N:|\
-dangle N:|\
-dark V:|\
-dastard A:|\
-daylight V:|\
-deacon V:|\
-deafening N:|\
-deal A:|\
-debouch N:|\
-decal V:|\
-decision V:|\
-dedicate A:|\
-defence V:|\
-defendant A:|\
-deficient N:|\
-definitive N:|\
-defoliate A:|\
-deject A:|\
-delectable N:|\
-delicate N:|\
-demagog V:|\
-demagogue V:|\
-demolition A:|\
-demoniac N:|\
-demotic N:|\
-den V:|\
-denizen V:|\
-dental N:|\
-deponent A:|\
-derail N:|\
-derogate A:|\
-derrick V:|\
-descant A:|\
-desiccant A:|\
-desirable N:|\
-desperate N:|\
-despite N:|\
-despite V:|\
-destitute V:|\
-determinate V:|\
-detrimental N:|\
-dew V:|\
-diadem V:|\
-diagnostic N:|\
-dialog V:|\
-dialogue V:|\
-diamond V:|\
-diaphragm V:|\
-dick V:|\
-dicker N:|\
-dickey A:|\
-difference V:|\
-digestive N:|\
-digital N:|\
-dike V:|\
-dimension V:|\
-dingdong A:|\
-dint V:|\
-diphthong V:|\
-diploma V:|\
-directory A:|\
-dirigible A:|\
-dirk V:|\
-disagreeable N:|\
-disc V:|\
-disciple V:|\
-discomfit N:|\
-discountenance N:|\
-discriminate A:|\
-disease V:|\
-disinterest V:|\
-disjoint A:|\
-disjunctive N:|\
-disk V:|\
-dismal N:|\
-disperse A:|\
-displeasure V:|\
-disport N:|\
-dispose N:|\
-disproportion V:|\
-disquiet A:|\
-dissolve N:|\
-distaste V:|\
-distemper V:|\
-distributive N:|\
-district V:|\
-ditty V:|\
-diurnal N:|\
-dolly V:|\
-douse N:|\
-downcast N:|\
-downstage N:|\
-dowse N:|\
-dozen V:|\
-drab V:|\
-dram V:|\
-drat V:|\
-dray V:|\
-dreadful N:|\
-drench N:|\
-drinkable N:|\
-droll V:|\
-drove V:|\
-drub N:|\
-druggie A:|\
-druggy A:|\
-dual N:|\
-duct V:|\
-duet V:|\
-duff V:|\
-dug N:|\
-dulcet N:|\
-dummy V:|\
-duodecimal N:|\
-duplex V:|\
-durable N:|\
-dusk A:|\
-dusk V:|\
-dwell N:|\
-dyke V:|\
-eager N:|\
-eagle V:|\
-ear V:|\
-early N:|\
-earwig V:|\
-eastward N:|\
-echelon V:|\
-ecstatic N:|\
-effective N:|\
-effeminate V:|\
-efferent N:|\
-effuse A:|\
-eggshell A:|\
-egress V:|\
-ejaculate N:|\
-elderly N:|\
-electric N:|\
-electroplate N:|\
-electroshock V:|\
-electrotype V:|\
-elemental N:|\
-elevated N:|\
-elfin N:|\
-eligible N:|\
-elliptical N:|\
-elongate A:|\
-emasculate A:|\
-emblem V:|\
-embryo A:|\
-emergency A:|\
-emergent N:|\
-emerita N:|\
-emeritus N:|\
-emphatic N:|\
-empiric N:|\
-enclave V:|\
-enervate A:|\
-ensilage V:|\
-entail N:|\
-entire N:|\
-ephemera N|\
-ephemeral N:|\
-epitaph V:|\
-equatorial N:|\
-equinoctial N:|\
-equipoise V:|\
-erotic N:|\
-eruptive N:|\
-escrow V:|\
-esquire V:|\
-estate V:|\
-esthetic N:|\
-eternal N:|\
-ethylene A:|\
-eviscerate A:|\
-ex A:|\
-exasperate A:|\
-excess V:|\
-excommunicate A:|\
-excommunicate N:|\
-excursion V:|\
-exempt N:|\
-existent N:|\
-expectant N:|\
-expedite A:|\
-expense V:|\
-expert V:|\
-expertise V:|\
-expletive A:|\
-exponential N:|\
-exquisite N:|\
-extravert A:|\
-extravert V:|\
-extrovert V:|\
-eyelet V:|\
-fable V:|\
-facelift V:|\
-faerie A:|\
-faery A:|\
-fair V:|\
-fame V:|\
-fang V:|\
-fantastic N:|\
-farce V:|\
-farrow A:|\
-fashionable N:|\
-fat V:|\
-fatigue A:|\
-feat A:|\
-fee V:|\
-fellow V:|\
-fellowship V:|\
-felon A:|\
-ferrule V:|\
-ferule V:|\
-fess N:|\
-fetch N:|\
-fettle V:|\
-fever V:|\
-fiberglass V:|\
-fibroid N:|\
-fife V:|\
-filthy V:|\
-fin V:|\
-financier V:|\
-finite N:|\
-fishtail N:|\
-fission V:|\
-fissionable N:|\
-fissure V:|\
-fist V:|\
-flack V:|\
-flagellate N:|\
-flagging N:|\
-flamboyant N:|\
-flange V:|\
-flew N:|\
-flight V:|\
-flimsy N:|\
-flint V:|\
-floral N:|\
-flume V:|\
-fluorescent N:|\
-fluoroscope V:|\
-fodder V:|\
-foldaway N:|\
-folio A:|\
-folio V:|\
-follow N:|\
-fond N:|\
-fondu A:|\
-football V:|\
-forelock V:|\
-forklift V:|\
-formative N:|\
-forthright N:|\
-fortissimo N:|\
-fortnightly N:|\
-fortune V:|\
-found N:|\
-foursquare N:|\
-fraction V:|\
-frail N:|\
-frappe V:|\
-fraught N:|\
-freewheel N:|\
-frenetic N:|\
-frenzy V:|\
-fresco V:|\
-fresh N:|\
-fresh V:|\
-freshman A:|\
-friend V:|\
-frill V:|\
-frisk N:|\
-fro N:|\
-frock V:|\
-frog V:|\
-frolic A:|\
-frontal N:|\
-frosted N:|\
-frustrate A:|\
-fucking N:|\
-fugue V:|\
-fulcrum V:|\
-fuller V:|\
-fulminate N:|\
-fun V:|\
-functional N:|\
-fungoid N:|\
-furbelow V:|\
-furnace V:|\
-fusillade V:|\
-gad N:|\
-gaggle V:|\
-gait V:|\
-gallant V:|\
-gammon V:|\
-gander V:|\
-gantlet V:|\
-gap V:|\
-gar V:|\
-garble N:|\
-garment V:|\
-garner N:|\
-garter V:|\
-gash A:|\
-gaudy N:|\
-gauntlet V:|\
-gavel V:|\
-gavotte V:|\
-gawk N:|\
-gee N:|\
-geld N:|\
-gem V:|\
-gender V:|\
-gentle N:|\
-geometric N:|\
-geriatric N:|\
-ghetto V:|\
-gibber N:|\
-giddy V:|\
-gill V:|\
-gimmick V:|\
-ginger V:|\
-gipsy V:|\
-gird N:|\
-girly N:|\
-girth V:|\
-glad V:|\
-glassy N:|\
-glee V:|\
-glister N:|\
-glitz V:|\
-globe V:|\
-gloom V:|\
-gnawing N:|\
-god V:|\
-goddamn V:|\
-godfather V:|\
-gopher V:|\
-gormandize N:|\
-gospel V:|\
-governess V:|\
-gradient A:|\
-gradual N:|\
-grain V:|\
-gravel A:|\
-griddle V:|\
-gridiron V:|\
-groin V:|\
-grommet V:|\
-grouse A:|\
-grubby N:|\
-grubstake V:|\
-grueling N:|\
-gruelling N:|\
-grump V:|\
-guise V:|\
-gulf V:|\
-gullet V:|\
-gully V:|\
-gurgling N:|\
-guts V:|\
-gypsy A:|\
-gypsy V:|\
-gyrate A:|\
-habit V:|\
-hackle V:|\
-haft V:|\
-haggard N:|\
-halcyon N:|\
-halftone A:|\
-hallo V:|\
-handset V:|\
-hangar V:|\
-hangdog N:|\
-hank V:|\
-hap V:|\
-haphazard N:|\
-harbinger V:|\
-hard N:|\
-hardcore N:|\
-hardy N:|\
-hasp V:|\
-hatchet V:|\
-haunting N:|\
-haven V:|\
-havoc V:|\
-haywire N:|\
-heather A:|\
-heir V:|\
-hello V:|\
-helm V:|\
-helve V:|\
-herbal N:|\
-heroic N:|\
-hi A:|\
-highball V:|\
-hill V:|\
-hilltop V:|\
-hilt V:|\
-hippy A:|\
-histrionic N:|\
-hob V:|\
-holograph V:|\
-holy N:|\
-honcho V:|\
-hooky A:|\
-horn V:|\
-horselaugh V:|\
-hosanna V:|\
-hostage V:|\
-hot V:|\
-hovel V:|\
-hover N:|\
-howdy N:|\
-hoyden A:|\
-hub V:|\
-hulk V:|\
-hullo V:|\
-hunky N:|\
-hut V:|\
-hymeneal N:|\
-hymnal A:|\
-hyper N:|\
-hypo V:|\
-illegitimate N:|\
-illegitimate V:|\
-illuminate N:|\
-imaginary N:|\
-immovable N:|\
-immune N:|\
-imp V:|\
-implosive N:|\
-impost V:|\
-impotent N:|\
-inane N:|\
-incapable N:|\
-incombustible N:|\
-incoming N:|\
-incorrigible N:|\
-indefinable N:|\
-indivisible N:|\
-indulgence V:|\
-industrial N:|\
-inexpressible N:|\
-infallible N:|\
-infatuate N:|\
-infect A:|\
-infiltrate N:|\
-infirm V:|\
-inflammable N:|\
-influential N:|\
-ingot V:|\
-ingrate A:|\
-inlet V:|\
-innermost N:|\
-innumerate N:|\
-insolent N:|\
-insubordinate N:|\
-insular N:|\
-intaglio V:|\
-interlinear N:|\
-interlink N:|\
-intermediate V:|\
-intern A:|\
-internal N:|\
-interne V:|\
-interplay V:|\
-interstitial N:|\
-interurban N:|\
-interweave N:|\
-intestate N:|\
-intolerant N:|\
-introvert V:|\
-inverse V:|\
-invisible N:|\
-inward N:|\
-iris V:|\
-irony A:|\
-irreconcilable N:|\
-irresponsible N:|\
-island V:|\
-isle V:|\
-isometric N:|\
-isthmian N:|\
-item V:|\
-jack A:|\
-jacket V:|\
-jackrabbit V:|\
-jag V:|\
-japan A:|\
-jargon V:|\
-javelin V:|\
-jeep V:|\
-jerkwater N:|\
-jetty A:|\
-jetty V:|\
-jitney V:|\
-jobless N:|\
-joist V:|\
-journal V:|\
-julienne N:|\
-junketeer V:|\
-jury V:|\
-just V:|\
-kelp V:|\
-kerb V:|\
-kernel V:|\
-kibosh V:|\
-kilt V:|\
-kin A:|\
-king V:|\
-kit V:|\
-kitten V:|\
-kneel N:|\
-knockdown A:|\
-knoll V:|\
-know N:|\
-known N:|\
-kosher N:|\
-kraal V:|\
-lachrymal N:|\
-lackey V:|\
-lackluster N:|\
-lacklustre N:|\
-lacrimal N:|\
-lactate N:|\
-lacteal N:|\
-laden V:|\
-lager V:|\
-lair V:|\
-lamp V:|\
-landfill V:|\
-landmark V:|\
-lane A:|\
-lantern V:|\
-laryngeal N:|\
-lasting N:|\
-lattice V:|\
-launder N:|\
-laurel V:|\
-law A:|\
-law V:|\
-lawyer V:|\
-leach N:|\
-leaden V:|\
-leather V:|\
-lech V:|\
-lecher V:|\
-ledge V:|\
-legendary N:|\
-legislative N:|\
-legit N:|\
-lenitive N:|\
-lens V:|\
-lesion V:|\
-lesson V:|\
-levee V:|\
-lichen V:|\
-lid V:|\
-lifeguard V:|\
-lighter V:|\
-lightface A:|\
-lilliputian N:|\
-limb V:|\
-limber N:|\
-limited N:|\
-lingual N:|\
-lip V:|\
-lit N:|\
-liver V:|\
-livery A:|\
-loam V:|\
-local V:|\
-loco N:|\
-loco V:|\
-logistic N:|\
-loll N:|\
-longhand A:|\
-loophole V:|\
-lop N:|\
-lot V:|\
-lout V:|\
-louver V:|\
-lower N:|\
-lowercase V:|\
-lubber A:|\
-lucky N:|\
-luff N:|\
-lullaby V:|\
-lumbar N:|\
-luminary A:|\
-lunar N:|\
-lurk N:|\
-lush V:|\
-luster V:|\
-lustre V:|\
-lute V:|\
-macrame V:|\
-macrobiotic N:|\
-mad V:|\
-mag V:|\
-maim N:|\
-main V:|\
-mandamus V:|\
-mandatory N:|\
-maraud N:|\
-margin V:|\
-marl V:|\
-mason V:|\
-mast V:|\
-masthead V:|\
-matriculate N:|\
-maxillary N:|\
-maze V:|\
-meagre N:|\
-mechanical N:|\
-medal V:|\
-mediaeval N:|\
-medial N:|\
-medicine V:|\
-medieval N:|\
-medley A:|\
-menthol A:|\
-mercurial N:|\
-meringue V:|\
-messenger V:|\
-metal V:|\
-metallic N:|\
-metric N:|\
-metropolitan N:|\
-mid N:|\
-middle V:|\
-middling N:|\
-miff N:|\
-minim A:|\
-minion A:|\
-missing V:|\
-missive A:|\
-mister V:|\
-mock N:|\
-modem V:|\
-modular N:|\
-monitory N:|\
-monoclonal N:|\
-monocular N:|\
-monograph V:|\
-montage V:|\
-monument V:|\
-moonwalk V:|\
-moot N:|\
-mordant V:|\
-morph N:|\
-morsel V:|\
-mosaic V:|\
-moss V:|\
-motive V:|\
-motorcade V:|\
-mottle N:|\
-moulder N:|\
-mountebank V:|\
-mud V:|\
-muffle N:|\
-mugger V:|\
-mull N:|\
-mullion V:|\
-multiply A:|\
-mum V:|\
-mummy V:|\
-murk A:|\
-musky N:|\
-must V|\
-musty N:|\
-mutual N:|\
-nasty N:|\
-naught A:|\
-neat N:|\
-necklace V:|\
-negotiable N:|\
-nett N:|\
-nett V:|\
-newsy N:|\
-niche V:|\
-nickel V:|\
-nifty N:|\
-nigger V:|\
-nigh V:|\
-nighttime A:|\
-nocturnal N:|\
-nominal N:|\
-nonacademic N:|\
-noncombustible N:|\
-noncontributory N:|\
-nondescript N:|\
-noneffective N:|\
-nonelectric N:|\
-nonessential N:|\
-nonmilitant N:|\
-nonperishable N:|\
-nonplus N:|\
-nonresistant N:|\
-nonstop N:|\
-nontaxable N:|\
-nonthinking N:|\
-nonunion N:|\
-nonvocal N:|\
-noose V:|\
-northeastward N:|\
-northern N:|\
-northward N:|\
-northwestward N:|\
-null V:|\
-numeric N:|\
-nursemaid V:|\
-nutritive N:|\
-oblate N:|\
-oblique V:|\
-obscure N:|\
-observable N:|\
-observant N:|\
-occlusive N:|\
-occult V:|\
-ocher V:|\
-ochre V:|\
-octave A:|\
-odd N:|\
-off N:|\
-officer V:|\
-offprint V:|\
-omen V:|\
-omnipotent N:|\
-omniscient N:|\
-on N:|\
-oncoming N:|\
-opaque N:|\
-ope A:|\
-opiate V:|\
-or N:|\
-orb V:|\
-orgasm V:|\
-ornamental N:|\
-ouch N:|\
-ouch V:|\
-ought N:|\
-outcry V:|\
-outspread N:|\
-outward N:|\
-over V:|\
-overburden N:|\
-overcoat V:|\
-overdrive V:|\
-overhand V:|\
-overheat N:|\
-overlord V:|\
-overnight V:|\
-overpass V:|\
-overpraise N:|\
-oversea N:|\
-overshoot N:|\
-overshot N:|\
-oversize N:|\
-overstock N:|\
-oversupply N:|\
-overtime V:|\
-overture V:|\
-overturn N:|\
-overweight V:|\
-owl V:|\
-oyster V:|\
-packet V:|\
-palisade V:|\
-pallet V:|\
-palsy A:|\
-pamphleteer V:|\
-pappy A:|\
-paraffin V:|\
-paragon V:|\
-paramount N:|\
-parcel A:|\
-parietal N:|\
-paschal N:|\
-passage V:|\
-passe N:|\
-pastor V:|\
-pauper V:|\
-pavilion V:|\
-payable N:|\
-payoff A:|\
-peace V:|\
-peach V:|\
-peacock V:|\
-peanut A:|\
-pearly N:|\
-peculiar N:|\
-pedestal V:|\
-peen V:|\
-pellmell N:|\
-penitential N:|\
-penny A:|\
-percipient N:|\
-percolate N:|\
-perk A:|\
-persuasive N:|\
-petrol V:|\
-pharyngeal N:|\
-philter V:|\
-philtre V:|\
-phonetic N:|\
-phrenetic N:|\
-picayune N:|\
-pickaback N:|\
-pie V:|\
-piffle V:|\
-pigment V:|\
-pilgrimage V:|\
-pill V:|\
-pillar V:|\
-pincer V:|\
-pinnacle V:|\
-pipeline V:|\
-pipette V:|\
-pique A:|\
-pistol V:|\
-pitapat V:|\
-pith V:|\
-plain V:|\
-planetary N:|\
-platy A:|\
-plod N:|\
-ploy V:|\
-pluvial N:|\
-pneumatic N:|\
-poetic N:|\
-poky N:|\
-pollen V:|\
-poltroon A:|\
-pond V:|\
-poniard V:|\
-pontifical N:|\
-pony V:|\
-posit N:|\
-post A:|\
-postal N:|\
-postcard V:|\
-posthaste N:|\
-potent N:|\
-pour N:|\
-praetorian N:|\
-prank V:|\
-precaution V:|\
-precious N:|\
-predecease N:|\
-predicable N:|\
-preempt N:|\
-preen N:|\
-preform N:|\
-prelude V:|\
-premature N:|\
-premix N:|\
-prescript A:|\
-pretension V:|\
-prevue V:|\
-priest V:|\
-prig V:|\
-prim V:|\
-prise N:|\
-privateer V:|\
-procedural N:|\
-profound N:|\
-prolog V:|\
-prologue V:|\
-prone N:|\
-prong V:|\
-propitiatory N:|\
-proportionate V:|\
-prose V:|\
-protocol V:|\
-prototype V:|\
-proverb V:|\
-provisional N:|\
-provocative N:|\
-prow A:|\
-psalm V:|\
-pshaw V:|\
-pug V:|\
-pumice V:|\
-purple V:|\
-pussyfoot N:|\
-quad A:|\
-quad V:|\
-quadrennial N:|\
-quicksilver V:|\
-quill V:|\
-quire V:|\
-quirt V:|\
-quitclaim V:|\
-quoin V:|\
-quotidian N:|\
-qwerty N:|\
-rabble V:|\
-radiant N:|\
-radiate A:|\
-radiotelephone V:|\
-rafter V:|\
-ragout V:|\
-raiment V:|\
-rainproof V:|\
-ramp V:|\
-rampart V:|\
-random N:|\
-randy N:|\
-rapture V:|\
-ravening N:|\
-rawhide V:|\
-ray V:|\
-razor V:|\
-ready N:|\
-real N|\
-real N|\
-rearguard A:|\
-rearward N:|\
-rebid N:|\
-recalcitrant N:|\
-recitative A:|\
-reclaim N:|\
-recommission N:|\
-recontact N:|\
-recoup N:|\
-red V:|\
-redirect A:|\
-redouble N:|\
-redraft N:|\
-reductive N:|\
-reed V:|\
-reflex V:|\
-refuge V:|\
-regal N:|\
-regale N:|\
-regional N:|\
-reload N:|\
-remainder V:|\
-remand N:|\
-rematch V:|\
-remit N:|\
-remix N:|\
-remnant A:|\
-renege N:|\
-renewable N:|\
-renounce N:|\
-reorient A:|\
-repaint N:|\
-repent A:|\
-rephotograph N:|\
-reprobate V:|\
-reproductive N:|\
-reptile A:|\
-repurchase N:|\
-resin V:|\
-resistant N:|\
-resonant N:|\
-respite V:|\
-respond N:|\
-restudy N:|\
-resurvey N:|\
-retch N:|\
-retinal N:|\
-reveal N:|\
-revere N:|\
-reversible N:|\
-revert N:|\
-revoke N:|\
-rhythmic N:|\
-ribald N:|\
-ribbon V:|\
-riparian N:|\
-ripsaw V:|\
-roach V:|\
-roam N:|\
-rod V:|\
-rode N:|\
-rodeo V:|\
-rogue V:|\
-roomy N:|\
-rose V:|\
-rotate A:|\
-roulette V:|\
-rove N:|\
-roving N:|\
-rubber V:|\
-rubric A:|\
-rummy A:|\
-rump A:|\
-rural N:|\
-rust A:|\
-saber V:|\
-sabre V:|\
-sacramental N:|\
-said N:|\
-sailplane V:|\
-saint V:|\
-sallow N:|\
-sallow V:|\
-salsa V:|\
-salutatory N:|\
-salvo V:|\
-sandal V:|\
-sanguine N:|\
-sanitarian A:|\
-sash V:|\
-sassy N:|\
-saurian N:|\
-scabbard V:|\
-scaffold V:|\
-scald A:|\
-scamp V:|\
-scandal V:|\
-scenic N:|\
-scepter V:|\
-sceptre V:|\
-schmooze N:|\
-scholastic N:|\
-schoolmaster V:|\
-sciatic N:|\
-sconce V:|\
-scoot N:|\
-scour N:|\
-scow V:|\
-scrag V:|\
-scribe V:|\
-scrooge V:|\
-sear A:|\
-sector V:|\
-secular N:|\
-sediment V:|\
-seeming N:|\
-seep N:|\
-seethe N:|\
-self V:|\
-semiotic N:|\
-semisolid N:|\
-send N:|\
-senile N:|\
-sentient N:|\
-sentinel V:|\
-sere N:|\
-serge V:|\
-serpentine V:|\
-serrate V:|\
-servo V:|\
-sewer V:|\
-shack V:|\
-shallow V:|\
-shammy V:|\
-shank V:|\
-shanty V:|\
-sheaf V:|\
-sheave V:|\
-sheen A:|\
-sheen V:|\
-sheeny N:|\
-sheet V:|\
-shelf V:|\
-shier N:|\
-shinny N:|\
-shirk N:|\
-shoal A:|\
-shook N:|\
-shore A:|\
-shortwave V:|\
-shorty A:|\
-shot V:|\
-shrimp A:|\
-shrine V:|\
-shut N:|\
-sickly V:|\
-siege V:|\
-signet V:|\
-significant N:|\
-signore N:|\
-silk V:|\
-silkscreen A:|\
-silo V:|\
-silvan N:|\
-simple N:|\
-sinew V:|\
-sirup V:|\
-situate A:|\
-skill V:|\
-skoal V:|\
-skulk N:|\
-skyline V:|\
-slag V:|\
-slang V:|\
-slat V:|\
-sleeve V:|\
-sleuth V:|\
-slime V:|\
-slink N:|\
-slipcover V:|\
-slipper V:|\
-slipstream V:|\
-slosh N:|\
-slurry V:|\
-slush V:|\
-smith V:|\
-smooth N:|\
-smut V:|\
-snafu A:|\
-snafu V:|\
-snapshot V:|\
-snood V:|\
-snoot V:|\
-soaring N:|\
-socket V:|\
-sodden V:|\
-soft N:|\
-softbound N:|\
-solar N:|\
-sonnet V:|\
-soot V:|\
-sooth A:|\
-sophomore A:|\
-sorry N:|\
-sourdough A:|\
-south V:|\
-southeastward N:|\
-southwestward N:|\
-spec A:|\
-spelt N:|\
-sphere V:|\
-spiderweb V:|\
-spire V:|\
-splayfoot A:|\
-splenetic N:|\
-spoke V:|\
-spouse V:|\
-sprig V:|\
-spud V:|\
-spurn N:|\
-squab A:|\
-squadron V:|\
-squander N:|\
-squib V:|\
-stadia N:|\
-stag V:|\
-stanch N:|\
-stanchion V:|\
-starboard V:|\
-startle N:|\
-stationary N:|\
-statue V:|\
-staunch N:|\
-stead V:|\
-steamer V:|\
-steeplechase V:|\
-stereo V:|\
-stevedore V:|\
-sticker V:|\
-stifle N:|\
-stigmatic N:|\
-stiletto V:|\
-stilt V:|\
-stimulative N:|\
-stooge V:|\
-stool V:|\
-story V:|\
-stove V:|straightjacket V:|straightforward N\?:|strait A:|\
-strata N:|streamline N:|stretcher V:|stun N:|sturdy N:|\
-sty V:|subculture V:|sublimate N:|submarine V:|subnormal N:|\
-substantial N:|subteen A:|subterranean N:|subway V:|sudden N:|\
-suds V:|suede V:|suicide V:|sulfate V:|sulfur V:|sully N:|summit V:|\
-sunburst A:|sundown V:|sunrise A:|superhuman N:|supine N:|supper V:|\
-supple V:|supplemental N:|supplementary N:|supreme N:|surname V:|\
-surrogate V:|surround N:|suspicion V:|swaddle N:|swan V:|\
-sward V:|swinging N:|switchback V:|syllabic N:|syllable V:|syllogistic N:|\
-sylvan N:|symbol V:|synapse V:|syrup V:|tabby V:|tabernacle V:|\
-tablet V:|\
-tabor V:|\
-talc V:|\
-tallow V:|\
-tamper N:|\
-tampon V:|\
-tang V:|\
-tapestry V:|\
-tariff V:|\
-tawdry N:|\
-taxable N:|\
-teach N:|\
-teasel V:|\
-teetotal V:|\
-telegram V:|\
-telemeter V:|\
-tell N:|\
-tempest V:|\
-temporal N:|\
-tenon V:|\
-tension V:|\
-tertiary N:|\
-texture V:|\
-theatrical N:|\
-theme V:|\
-therapeutic N:|\
-thermostat V:|\
-thickset N:|\
-think N:|\
-thole V:|\
-thorn V:|\
-thou V:|\
-threat V:|\
-throat V:|\
-throne V:|\
-thumbtack V:|\
-thundering N:|\
-ticktock V:|\
-tier V:|\
-tightrope V:|\
-tiller V:|\
-timber V:|\
-tissue V:|\
-titular N:|\
-toenail V:|\
-token V:|\
-tole V:|\
-tom V:|\
-tomcat V:|\
-tooth V:|\
-tootle N:|\
-topsoil V:|\
-tore N:|\
-torpid N:|\
-torrent A:|\
-tourney V:|\
-tousle N:|\
-toward A:|\
-toxic N:|\
-trance V:|\
-transcendent N:|\
-transcendental N:|\
-tress V:|\
-triage V:|\
-trice V:|\
-trifling N:|\
-trig V:|\
-trinket V:|\
-trochaic N:|\
-trolley V:|\
-trolly V:|\
-truce V:|\
-truncheon V:|\
-trustee V:|\
-tub V:|\
-tubercular N:|\
-tun V:|\
-turpentine V:|\
-turtle V:|\
-tusk V:|\
-tutelary N:|\
-twill V:|\
-tyre V:|\
-ugh N:|\
-umber V:|\
-umbilical N:|\
-umlaut V:|\
-underage N:|\
-underbid N:|\
-underlay V:|\
-underwater N:|\
-undress A:|\
-unemployable N:|\
-unessential N:|\
-unicycle V:|\
-unique N:|\
-unite N:|\
-unmarried N:|\
-unpredictable N:|\
-unprofessional N:|\
-unquiet N:|\
-unsteady V:|\
-unthinkable N:|\
-untidy V:|\
-unwashed N:|\
-unworkable N:|\
-unworthy N:|\
-uppercase V:|\
-upright V:|\
-upscale V:|\
-upstage N:|\
-upswing V:|\
-urinary N:|\
-valiant N:|\
-vanish N:|\
-vapor V:|\
-vapour V:|\
-venom V:|\
-vermilion V:|\
-vesiculate V:|\
-vestibule V:|\
-via N:|\
-vial V:|\
-vibrant N:|\
-vinegar V:|\
-vintage V:|\
-viscose A:|\
-visor V:|\
-vitriol V:|\
-vizor V:|\
-vocable A:|\
-volatile N:|\
-volute A:|\
-votary A:|\
-vouch N:|\
-voucher V:|\
-vowel V:|\
-vulgar N:|\
-wafer V:|\
-waggon V:|\
-wagon V:|\
-waiter V:|\
-waitress V:|\
-wan V:|\
-wander N:|\
-wardrobe V:|\
-ware A:|\
-ware V:|\
-warm N:|\
-watchdog V:|\
-wattle A:|\
-wavy N:|\
-weapon V:|\
-wearable N:|\
-week A:|\
-weeny N:|\
-weird N:|\
-wench V:|\
-westward N:|\
-wham A:|\
-wharf V:|\
-wheelbarrow V:|\
-whereas N:|\
-wherewith N:|\
-wherry V:|\
-whet N:|\
-whew N:|\
-whiplash V:|\
-whist A:|\
-whist V:|\
-white V:|\
-whittle N:|\
-whore V:|\
-wick V:|\
-wide N:|\
-wife V:|\
-willow V:|\
-windlass V:|\
-window V:|\
-windrow V:|\
-winnow N:|\
-wireless V:|\
-wise V:|\
-wisp V:|\
-without N:|\
-witting N:|\
-wizard A:|\
-woman V:|\
-won V:|\
-wont V:|\
-woodshed V:|\
-workday A:|\
-worth V:|\
-wrack V:|\
-wrath A:|\
-wreath V:|\
-yard V:|\
-yarn V:|\
-yawl V:|\
-yearling A:|\
-yeast V:|\
-yen V:|\
-yore A:|\
-yummy N:|\
-zest V:|\
-zillion A:|\
-on N:|rockies N:|known N:|as A:|albert[ \t]N|i A:|her A:|allies[\t]N|then N:|donuts N\?:|us N:|\
-less N:|more N:|toward N\?:|anyhow A:|again A:|nope A:|\
-forth A:|askance A:|aloud A:|aloft A:|\
-afresh A:|all A:|quite A:|hence A:|ergo A:|almost A:|although A:|then A:|\
-thereof A:|most A:|too A:|therein A:|out A:|indeed A:|whereof A:|\
-in A:|twice A:|viva A:|not A:|often A:|once A:|never A:|nowhere A:|\
-where A:|wherein A:|t A:|ago A:|atop A:|notwithstanding A:|\
-away A:|very A:|daily A:|why A:|yet A:|since A:|after A:|before A:|\
-about A:|brother A:|sister A:|\
-feces N:|axes\tN|bases\tN|phenomena[ \t]N[:]*|automata\tN|cherubim[ \t]N[:]*|\
-apices\tN|cervices\tN|indices\tN|matrices\tN|vortices\tN|\
-elves\tN|halves\tN|hooves\tN|knives\tN|leaves\tN|lives\tN|loaves\tN|\
-scarves\tN|selves\tN|sheaves\tN|shelves\tN|wives\tN|wolves\tN|geese\tN|\
-lice\tN|mice\tN|children\tN|corpora[ \t]N[:]*|genera\tN|foci\tN|fungi\tN|\
-nuclei\tN|radii\tN|stimuli\tN|syllabi\tN|bacteria[ \t]N[:]*|data\tN|errata[ \t]N[:]*|\
-media[ \t]N[:]*|memoranda[ \t]N[:]*|ova\tN|strata[ \t]N[:]*|oxen[ \t]N[:]*|calves\tN|feet\tN|\
-women\tN|men\tN|well A:|who[ \t]N[:]*|an A:|an[ \t]DCN|themselves N:|\
-a[ \t]DNVP|He[ \t]N[:]*|me[ \t]N[:]*|he[ \t]N[:]*|I[ \t]N[:]*|this[ \t]N[:]*|\
-that[ \t][AN][:]*|such[ \t]N[:]*|his[ \t]N[:]*|t[ \t]N[:]*|she[ \t]N[:]*|\
-you[ \t]N[:]*|we[ \t]N[:]*|they[ \t]N[:]*|them[ \t]N[:]*|him[ \t]N[:]*|\
-her[ \t]N[:]*|your[ \t][NA][:]*|my[ \t]N[:]*|herself[ \t]N[:]*|\
-himself[ \t]N[:]*|it[ \t]N[:]*|itself[ \t]N[:]*|myself[ \t]N[:]*|\
-oneself[ \t]N[:]*|our[ \t]N[:]*|our[ \t]A[:]*|their[ \t]|\
-yourself[ \t]N[:]*|ourself[ \t]N[:]*|another[ \t]N[:]*|and[ \t]N[:]*|\
-any[ \t]A[:]*|all[ \t]A[:]*|an[ \t]N[:]*|each[ \t]A[:]*|either[ \t]A[:]*|\
-every[ \t]A[:]*|half[ \t]A[:]*|many[ \t]N[:]*|many[ \t]A[:]*|\
-much[ \t]N[:]*|neither[ \t]A[:]*|no[ \t]A[:]*|some[ \t]N[:]*|\
-some[ \t]A[:]*|such[ \t]A[:]*|those[ \t]N[:]*|those[ \t]A[:]*|\
-these[ \t]N[:]*|those[ \t]A[:]*|and[ \t]N\?[:]*|within[ \t]|this[ \t]A[:]*|\
-into[ \t]N[:]*|what[ \t][NA][:]*|whom[ \t][NA][:]*|whose[ \t][NA][:]*|\
-which[ \t]N[:]*|which[ \t]A[:]*|there[ \t]|will[ \t]V[:]*|\
-can[ \t]V[:]*|may[ \t]V[:]*|shall[ \t]V[:]*|ought[ \t]V[:]*|must[ \t]V[:]*|\
-could[ \t]V[:]*|would[ \t]V[:]*|inter[ \t]A[:]*|school[ \t]A[:]*|\
-the[ \t]A[:]*|mod[ \t]A:)/ && !/'/


Translators/DeepLTranslator: split lines beforehand (see #249)

--- include/Translators/DeepLTranslator.awk
+++ include/Translators/DeepLTranslator.awk
@@ -60,7 +60,7 @@
 function deeplTranslate(text, sl, tl, hl,
                         isVerbose, toSpeech, returnPlaylist, returnIl,
                         ####
-                        r, i, j,
+                        r, i, j, k, lines,
                         content, tokens, ast,
                         _sl, _tl, _hl, il,
                         sentences, translation, translations,
@@ -84,45 +84,52 @@
     if (_tl != "auto") _tl = toupper(_tl)
     if (_hl != "auto") _hl = toupper(_hl)

-    content = deeplPostSplit(text, _sl, _tl, _hl)
-    tokenize(tokens, content)
-    parseJson(ast, tokens)
-    for (i in ast) {
-        if (i ~ "^0" SUBSEP "result" SUBSEP "splitted_texts" SUBSEP "[[:digit:]]+" SUBSEP "[[:digit:]]+") {
-            append(sentences, uprintf(unquote(unparameterize(ast[i]))))
-        }
-    }
-    content = deeplPost(sentences, _sl, _tl, _hl)
-    if (Option["dump"])
-        return content
-    tokenize(tokens, content)
-    parseJson(ast, tokens)
-
-    l(content, "content", 1, 1)
-    l(tokens, "tokens", 1, 0, 1)
-    l(ast, "ast")
-    if (!isarray(ast) || !anything(ast)) {
-        e("[ERROR] Oops! Something went wrong and I can't translate it for you :(")
-        ExitCode = 1
-        return
-    }
-
-    saveSortedIn = PROCINFO["sorted_in"]
-    PROCINFO["sorted_in"] = "compareByIndexFields"
-    j = 0
-    for (i in ast) {
-        if (i ~ "^0" SUBSEP "result" SUBSEP "translations" SUBSEP "[[:digit:]]+" SUBSEP "beams" \
-            SUBSEP "[[:digit:]]+" SUBSEP "postprocessed_sentence$") {
-            temp = uprintf(unquote(unparameterize(ast[i])))
-            append(translations, temp)
-        }
-        if (i ~ "^0" SUBSEP "result" SUBSEP "translations" SUBSEP j SUBSEP "beams" \
-            SUBSEP "[[:digit:]]+" SUBSEP "postprocessed_sentence$") {
-            translation = j > 0 ? translation " " temp : temp
-            j++
-        }
-    }
-    PROCINFO["sorted_in"] = saveSortedIn
+    split(text, lines, "\n")
+    for (k in lines) {
+        if (k > 1) translation = translation "\n"
+
+        delete tokens; delete ast; delete sentences
+
+        content = deeplPostSplit(lines[k], _sl, _tl, _hl)
+        tokenize(tokens, content)
+        parseJson(ast, tokens)
+        for (i in ast) {
+            if (i ~ "^0" SUBSEP "result" SUBSEP "splitted_texts" SUBSEP "[[:digit:]]+" SUBSEP "[[:digit:]]+") {
+                append(sentences, uprintf(unquote(unparameterize(ast[i]))))
+            }
+        }
+        content = deeplPost(sentences, _sl, _tl, _hl)
+        if (Option["dump"])
+            return content
+        tokenize(tokens, content)
+        parseJson(ast, tokens)
+
+        l(content, "content", 1, 1)
+        l(tokens, "tokens", 1, 0, 1)
+        l(ast, "ast")
+        if (!isarray(ast) || !anything(ast)) {
+            e("[ERROR] Oops! Something went wrong and I can't translate it for you :(")
+            ExitCode = 1
+            return
+        }
+
+        saveSortedIn = PROCINFO["sorted_in"]
+        PROCINFO["sorted_in"] = "compareByIndexFields"
+        j = 0
+        for (i in ast) {
+            if (i ~ "^0" SUBSEP "result" SUBSEP "translations" SUBSEP "[[:digit:]]+" SUBSEP "beams" \
+                SUBSEP "[[:digit:]]+" SUBSEP "postprocessed_sentence$") {
+                temp = uprintf(unquote(unparameterize(ast[i])))
+                append(translations, temp)
+            }
+            if (i ~ "^0" SUBSEP "result" SUBSEP "translations" SUBSEP j SUBSEP "beams" \
+                SUBSEP "[[:digit:]]+" SUBSEP "postprocessed_sentence$") {
+                translation = j > 0 ? translation " " temp : translation temp
+                j++
+            }
+        }
+        PROCINFO["sorted_in"] = saveSortedIn
+    }

     returnIl[0] = il = tolower(unparameterize(ast[0 SUBSEP "result" SUBSEP "source_lang"]))
     if (Option["verbose"] < -1)


not sure what this even is...

not sure what this even is...

git-svn-id: 459970da87506910ac315916d0f5985452181198@3781 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe

--- adriana-lima.awk
+++ adriana-lima.awk
@@ -1,130 +0,0 @@
-#! /usr/bin/awk -f
-
-BEGIN{
-
-    READ_SLA = 500;
-    WRITE_SLA = 750;
-
-    readcnt = 0;
-    writecnt = 0;
-
-    wlat_tot = 0;
-    wlat_max = 0;
-    wlat_sqtot = 0;
-    wlat_slafail = 0;
-
-    DIST_BUCKET_LENGTH = 100;
-    DIST_BUCKET_COUNT = 20;
-    for(i=1; i<=DIST_BUCKET_COUNT; i++)
-    {
-        rlat_dist[i] = 0;
-        wlat_dist[i] = 0;
-    }
-
-
-    rlat_tot = 0;
-    rlat_max = 0;
-    rlat_sqtot = 0;
-    rlat_slafail = 0;
-
-    printf("READ SLA:\t%d\n", READ_SLA);
-    printf("WRITE SLA:\t%d\n", WRITE_SLA);
-    printf("\n");
-
-}
-
-/INFO - doRead()/ { readcnt = readcnt + 1;
-
-    split(substr($0, match($0, "latency:")+ length("latency:")+1), tmp_arr, " ");
-    #printf("%d\n", strtonum(tmp_arr[1]));
-
-    lat_val = strtonum(tmp_arr[1]);
-
-    dist_index = int(lat_val / DIST_BUCKET_LENGTH) + 1;
-    if(dist_index > DIST_BUCKET_COUNT)
-        dist_index = DIST_BUCKET_COUNT;
-    rlat_dist[dist_index]++;
-
-    rlat_tot = rlat_tot + lat_val;
-
-    rlat_sqtot = rlat_sqtot + lat_val*lat_val;
-
-    if(lat_val > rlat_max)
-        rlat_max = lat_val;
-
-    if(lat_val > READ_SLA)
-        rlat_slafail = rlat_slafail + 1;
-
-}
-
-
-/INFO - doInsert()/ { writecnt = writecnt + 1;
-
-    split(substr($0, match($0, "latency:")+ length("latency:")+1), tmp_arr, " ");
-
-    lat_val = tmp_arr[1];
-
-    if(index(tmp_arr[1], ",")!= 0)
-        lat_val = substr(tmp_arr[1],1,index(tmp_arr[1],",")-1);
-
-    #printf("%d\n", strtonum(lat_val));
-    lat_val = strtonum(lat_val);
-
-    dist_index = int(lat_val / DIST_BUCKET_LENGTH) + 1;
-    if(dist_index > DIST_BUCKET_COUNT)
-        dist_index = DIST_BUCKET_COUNT;
-    wlat_dist[dist_index]++;
-
-    wlat_tot = wlat_tot + lat_val;
-
-    wlat_sqtot = wlat_sqtot + lat_val*lat_val;
-
-    if(lat_val > wlat_max)
-        wlat_max = lat_val;
-
-    if(lat_val > WRITE_SLA)
-        wlat_slafail = wlat_slafail + 1;
-
-
-}
-
-
-END{
-
-    printf("R/W ratio:\t%.2f\n", strtonum(readcnt) / strtonum(writecnt));
-
-    printf("\n");
-
-    printf("#reads:\t%d\n",readcnt);
-    if(strtonum(readcnt) != 0)
-    {
-        printf("avg read latency:\t%.2f\n", (rlat_tot / readcnt));
-        printf("var read latency:\t%.2f\n", (rlat_sqtot/readcnt) - (rlat_tot/readcnt)*(rlat_tot/readcnt));
-        printf("max read latency:\t%.2f\n", rlat_max);
-        printf("read SLA fail:\t%d\n", rlat_slafail);
-
-        printf("\nREAD LATENCY DISTRIBUTION\n");
-        for(i=1; i<DIST_BUCKET_COUNT; i++)
-            printf("\t%d - %d:\t%d\n", (i-1)*DIST_BUCKET_LENGTH, i*DIST_BUCKET_LENGTH-1, rlat_dist[i]);
-        printf("\t%d - Inf:\t%d\n", (i-1)*DIST_BUCKET_LENGTH, rlat_dist[i]);
-    }
-
-    printf("\n");
-
-    printf("#writes:\t%d\n",writecnt);
-    if(strtonum(writecnt) != 0)
-    {
-        printf("avg write latency:\t%.2f\n", (wlat_tot / writecnt));
-        printf("var write latency:\t%.2f\n", (wlat_sqtot/writecnt) - (wlat_tot/writecnt)*(wlat_tot/writecnt));
-        printf("max write latency:\t%.2f\n", wlat_max);
-        printf("write SLA fail:\t%d\n", wlat_slafail);
-
-        printf("\nWRITE LATENCY DISTRIBUTION\n");
-        for(i=1; i<DIST_BUCKET_COUNT; i++)
-            printf("\t%d - %d:\t%d\n", (i-1)*DIST_BUCKET_LENGTH, i*DIST_BUCKET_LENGTH-1, wlat_dist[i]);
-        printf("\t%d - Inf:\t%d\n", (i-1)*DIST_BUCKET_LENGTH, wlat_dist[i]);
-    }
-
-
-}
-


+ Removed search for comment and swaped \ for / in VMWARE_SCRIPT path

--- src/condor_examples/convert_vmgahp_config_to_win32.awk
+++ src/condor_examples/convert_vmgahp_config_to_win32.awk
@@ -38,8 +38,8 @@

 # Set it up so we can change the VMWARE_SCRIPT option if we choose to
 # do so in the installer
-/^#VMWARE_SCRIPT/ {
-	printf "VMWARE_SCRIPT = $(BIN)\condor_vm_vmware.pl\n"
+/^VMWARE_SCRIPT/ {
+	printf "VMWARE_SCRIPT = $(BIN)/condor_vm_vmware.pl\n"
 	next
 }


fix pack script

fix pack script


URL wrangling.

URL wrangling.

--- src/cloudfront.awk
+++ src/cloudfront.awk
@@ -1,5 +1,35 @@
 BEGIN {
     print "[";
+}
+
+function printUrlQueryString(queryString)
+{
+    split(queryString, pairs, "&", seps)
+    len = length(pairs)
+    for (j = 1; j < len; ++j) {
+        split(pairs[j], keyValue, "=", seps2)
+        k = keyValue[1]
+        v = keyValue[2]
+        printf "\t\t\"%s\": \"%s\",\n", k, urlDecode(urlDecode(v))
+    }
+}
+
+function base64Decode(thing)
+{
+  "echo "$thing" | base64 --decode" | getline x
+  return x
+}
+
+function urlDecode(url) {
+    for (i = 0x20; i < 0x40; ++i) {
+        repl = sprintf("%c", i);
+        if ((repl == "&") || (repl == "\\")) {
+            repl = "\\" repl;
+        }
+        url = gensub(sprintf("%%%02X", i), repl, "g", url);
+        url = gensub(sprintf("%%%02x", i), repl, "g", url);
+    }
+    return url;
 }

 /^#/ {
@@ -30,7 +60,10 @@
     ssl_protocol = $21                # ssl-protocol
     ssl_cipher = $22                  # ssl-cipher
     x_edge_response_result_type = $23 # x-edge-response-result-type
-    printf "{\n\t\"date\": \"%s\",\n\t\"time\":\"%s\",\n\t\"x-edge-location\":\"\%s\",\n\t\"sc-bytes\": \"%s\",\n\t\"c-ip\": \"%s\",\n\t\"cs-method\": \"%s\",\n\t\"cs(Host)\": \"%s\",\n\t\"cs-uri-stream\": \"%s\",\n\t\"sc-status\": \"%s\",\n\t\"cs(Referer)\": \"%s\",\n\t\"cs(User-Agent)\": \"%s\",\n\t\"cs-uri-query\": \"%s\",\n\t\"cs(Cookie)\": \"%s\",\n\t\"x-edge-result-type\": \"%s\",\n\t\"x-edge-request-id\": \"%s\",\n\t\"x-host-header\": \"%s\"\n\t\"cs-protocol\": \"%s\",\n\t\"cs-bytes\": \"%s\",\n\t\"time-taken\": \"%s\",\n\t\"x-forwarded-for\": \"%s\",\n\t\"ssl-protocol\": \"%s\",\n\t\"ssl-cipher\": \"%s\",\n\t\"x-edge-response-result-type\": \"%s\"\n},\n", date, time, x_edge_location, sc_bytes, c_ip, cs_method, cs_Host, cs_uri_stem, sc_status, cs_Referer, cs_User_Agent, cs_uri_query, cs_Cookie, x_edge_result_type, x_edge_request_id, x_host_header, cs_protocol, cs_bytes, time_taken, x_forwarded_for, ssl_protocol, ssl_cipher, x_edge_response_result_type
+    printf "{\n\t\"date\": \"%s\",\n\t\"time\":\"%s\",\n\t\"x-edge-location\":\"\%s\",\n\t\"sc-bytes\": \"%s\",\n\t\"c-ip\": \"%s\",\n\t\"cs-method\": \"%s\",\n\t\"cs(Host)\": \"%s\",\n\t\"cs-uri-stream\": \"%s\",\n\t\"sc-status\": \"%s\",\n\t\"cs(Referer)\": \"%s\",\n\t\"cs(User-Agent)\": \"%s\",\n\t\"cs(Cookie)\": \"%s\",\n\t\"x-edge-result-type\": \"%s\",\n\t\"x-edge-request-id\": \"%s\",\n\t\"x-host-header\": \"%s\"\n\t\"cs-protocol\": \"%s\",\n\t\"cs-bytes\": \"%s\",\n\t\"time-taken\": \"%s\",\n\t\"x-forwarded-for\": \"%s\",\n\t\"ssl-protocol\": \"%s\",\n\t\"ssl-cipher\": \"%s\",\n\t\"x-edge-response-result-type\": \"%s\",\n", date, time, x_edge_location, sc_bytes, c_ip, cs_method, cs_Host, cs_uri_stem, sc_status, cs_Referer, urlDecode(urlDecode(cs_User_Agent)), cs_Cookie, x_edge_result_type, x_edge_request_id, x_host_header, cs_protocol, cs_bytes, time_taken, x_forwarded_for, ssl_protocol, ssl_cipher, x_edge_response_result_type
+  printf "\t\"cs-uri-query\": {\n"
+  printUrlQueryString(cs_uri_query)
+  printf "\t}\n"
 }

 END {


GenTK: cache TK

GenTK: cache TK


Remove some debug output.

Remove some debug output.

--- fzn/fzn2py.awk
+++ fzn/fzn2py.awk
@@ -273,8 +273,6 @@
 	print "    solver.setThreadCount(param['threads'])";
 	print "if param['solver'] == 'Mistral':";
 	print "    # LUBY, GEOMETRIC = 0, 1"
-	print "    print '%% running Mistral with restarts: %d %d %.1f' % (param['restart'], param['base'], param['factor'])";
-	#print "    solver.solveAndRestart(GEOMETRIC, 256, 1.3)";
 	print "    solver.solveAndRestart(param['restart'], param['base'], param['factor'])";
 	print "else:";
 	print "    solver.solve()";


Help: reimplement getReference()

Help: reimplement getReference()

--- include/Help.awk
+++ include/Help.awk
@@ -176,202 +176,103 @@
         print getHelp()
 }

+# Comparator using getName().
+function compName(i1, v1, i2, v2) {
+    if (getName(i1) < getName(i2)) return -1
+    else return (getName(i1) != getName(i2))
+}
+
 # Return a reference table of languages as a string.
 # Parameters:
 #     displayName = "endonym" or "name"
-function getReference(displayName) {
-    if (displayName == "name")
-        return "┌─────────────────────────────┬──────────────────────┬─────────────────┐" RS \
-            "│ " getName("af") "           - " ansi("bold", "af") "    │ " \
-            getName("ha") "          - " ansi("bold", "ha") "  │ "      \
-            getName("fa") "    - " ansi("bold", "fa") " │" RS           \
-            "│ " getName("sq") "            - " ansi("bold", "sq") "    │ " \
-            getName("he") "         - " ansi("bold", "he") "  │ "       \
-            getName("pl") "     - " ansi("bold", "pl") " │" RS          \
-            "│ " getName("ar") "              - " ansi("bold", "ar") "    │ " \
-            getName("hi") "          - " ansi("bold", "hi") "  │ "      \
-            getName("pt") " - " ansi("bold", "pt") " │" RS              \
-            "│ " getName("hy") "            - " ansi("bold", "hy") "    │ " \
-            getName("hmn") "          - " ansi("bold", "hmn") " │ "     \
-            getName("pa") "    - " ansi("bold", "pa") " │" RS           \
-            "│ " getName("az") "         - " ansi("bold", "az") "    │ " \
-            getName("hu") "      - " ansi("bold", "hu") "  │ "          \
-            getName("ro") "   - " ansi("bold", "ro") " │" RS            \
-            "│ " getName("eu") "              - " ansi("bold", "eu") "    │ " \
-            getName("is") "      - " ansi("bold", "is") "  │ "          \
-            getName("ru") "    - " ansi("bold", "ru") " │" RS           \
-            "│ " getName("be") "          - " ansi("bold", "be") "    │ " \
-            getName("ig") "           - " ansi("bold", "ig") "  │ "     \
-            getName("sr") "    - " ansi("bold", "sr") " │" RS           \
-            "│ " getName("bn") "             - " ansi("bold", "bn") "    │ " \
-            getName("id") "     - " ansi("bold", "id") "  │ "           \
-            getName("st") "    - " ansi("bold", "st") " │" RS           \
-            "│ " getName("bs") "             - " ansi("bold", "bs") "    │ " \
-            getName("ga") "          - " ansi("bold", "ga") "  │ "      \
-            getName("si") "    - " ansi("bold", "si") " │" RS           \
-            "│ " getName("bg") "           - " ansi("bold", "bg") "    │ " \
-            getName("it") "        - " ansi("bold", "it") "  │ "        \
-            getName("sk") "     - " ansi("bold", "sk") " │" RS          \
-            "│ " getName("ca") "             - " ansi("bold", "ca") "    │ " \
-            getName("ja") "       - " ansi("bold", "ja") "  │ "         \
-            getName("sl") "  - " ansi("bold", "sl") " │" RS             \
-            "│ " getName("ceb") "             - " ansi("bold", "ceb") "   │ " \
-            getName("jv") "       - " ansi("bold", "jv") "  │ "         \
-            getName("so") "     - " ansi("bold", "so") " │" RS          \
-            "│ " getName("ny") "            - " ansi("bold", "ny") "    │ " \
-            getName("kn") "        - " ansi("bold", "kn") "  │ "        \
-            getName("es") "    - " ansi("bold", "es") " │" RS           \
-            "│ " getName("zh-CN") "  - " ansi("bold", "zh-CN") " │ "    \
-            getName("kk") "         - " ansi("bold", "kk") "  │ "       \
-            getName("su") "  - " ansi("bold", "su") " │" RS             \
-            "│ " getName("zh-TW") " - " ansi("bold", "zh-TW") " │ "     \
-            getName("km") "          - " ansi("bold", "km") "  │ "      \
-            getName("sw") "    - " ansi("bold", "sw") " │" RS           \
-            "│ " getName("hr") "            - " ansi("bold", "hr") "    │ " \
-            getName("ko") "         - " ansi("bold", "ko") "  │ "       \
-            getName("sv") "    - " ansi("bold", "sv") " │" RS           \
-            "│ " getName("cs") "               - " ansi("bold", "cs") "    │ " \
-            getName("lo") "            - " ansi("bold", "lo") "  │ "    \
-            getName("tg") "      - " ansi("bold", "tg") " │" RS         \
-            "│ " getName("da") "              - " ansi("bold", "da") "    │ " \
-            getName("la") "          - " ansi("bold", "la") "  │ "      \
-            getName("ta") "      - " ansi("bold", "ta") " │" RS         \
-            "│ " getName("nl") "               - " ansi("bold", "nl") "    │ " \
-            getName("lv") "        - " ansi("bold", "lv") "  │ "        \
-            getName("te") "     - " ansi("bold", "te") " │" RS          \
-            "│ " getName("en") "             - " ansi("bold", "en") "    │ " \
-            getName("lt") "     - " ansi("bold", "lt") "  │ "           \
-            getName("th") "       - " ansi("bold", "th") " │" RS        \
-            "│ " getName("eo") "           - " ansi("bold", "eo") "    │ " \
-            getName("mk") "     - " ansi("bold", "mk") "  │ "           \
-            getName("tr") "    - " ansi("bold", "tr") " │" RS           \
-            "│ " getName("et") "            - " ansi("bold", "et") "    │ " \
-            getName("mg") "       - " ansi("bold", "mg") "  │ "         \
-            getName("uk") "  - " ansi("bold", "uk") " │" RS             \
-            "│ " getName("tl") "            - " ansi("bold", "tl") "    │ " \
-            getName("ms") "          - " ansi("bold", "ms") "  │ "      \
-            getName("ur") "       - " ansi("bold", "ur") " │" RS        \
-            "│ " getName("fi") "             - " ansi("bold", "fi") "    │ " \
-            getName("ml") "      - " ansi("bold", "ml") "  │ "          \
-            getName("uz") "      - " ansi("bold", "uz") " │" RS         \
-            "│ " getName("fr") "              - " ansi("bold", "fr") "    │ " \
-            getName("mt") "        - " ansi("bold", "mt") "  │ "        \
-            getName("vi") " - " ansi("bold", "vi") " │" RS              \
-            "│ " getName("gl") "            - " ansi("bold", "gl") "    │ " \
-            getName("mi") "          - " ansi("bold", "mi") "  │ "      \
-            getName("cy") "      - " ansi("bold", "cy") " │" RS         \
-            "│ " getName("ka") "            - " ansi("bold", "ka") "    │ " \
-            getName("mr") "        - " ansi("bold", "mr") "  │ "        \
-            getName("yi") "    - " ansi("bold", "yi") " │" RS           \
-            "│ " getName("de") "              - " ansi("bold", "de") "    │ " \
-            getName("mn") "      - " ansi("bold", "mn") "  │ "          \
-            getName("yo") "     - " ansi("bold", "yo") " │" RS          \
-            "│ " getName("el") "               - " ansi("bold", "el") "    │ " \
-            getName("my") "        - " ansi("bold", "my") "  │ "        \
-            getName("zu") "       - " ansi("bold", "zu") " │" RS        \
-            "│ " getName("gu") "            - " ansi("bold", "gu") "    │ " \
-            getName("ne") "         - " ansi("bold", "ne") "  │ "       \
-            "                │" RS                                      \
-            "│ " getName("ht") "      - " ansi("bold", "ht") "    │ "   \
-            getName("no") "      - " ansi("bold", "no") "  │ "          \
-            "                │" RS                                      \
-            "└─────────────────────────────┴──────────────────────┴─────────────────┘"
-    else
-        return "┌──────────────────────┬───────────────────────┬─────────────────────┐" RS \
-            "│ " getDisplay("af") "      - " ansi("bold", "af") "  │ "  \
-            getDisplay("hu") "           - " ansi("bold", "hu") " │ "   \
-            getDisplay("pl") "      - " ansi("bold", "pl") "    │" RS   \
-            "│ " getDisplay("ar") "        - " ansi("bold", "ar") "  │ " \
-            getDisplay("hy") "          - " ansi("bold", "hy") " │ "    \
-            getDisplay("pt") "   - " ansi("bold", "pt") "    │" RS      \
-            "│ " getDisplay("az") "   - " ansi("bold", "az") "  │ "     \
-            getDisplay("id") " - " ansi("bold", "id") " │ "             \
-            getDisplay("ro") "      - " ansi("bold", "ro") "    │" RS   \
-            "│ " getDisplay("be") "     - " ansi("bold", "be") "  │ "   \
-            getDisplay("ig") "             - " ansi("bold", "ig") " │ " \
-            getDisplay("ru") "     - " ansi("bold", "ru") "    │" RS    \
-            "│ " getDisplay("bg") "      - " ansi("bold", "bg") "  │ "  \
-            getDisplay("is") "         - " ansi("bold", "is") " │ "     \
-            getDisplay("si") "        - " ansi("bold", "si") "    │" RS \
-            "│ " getDisplay("bn") "          - " ansi("bold", "bn") "  │ " \
-            getDisplay("it") "         - " ansi("bold", "it") " │ "     \
-            getDisplay("sk") "  - " ansi("bold", "sk") "    │" RS       \
-            "│ " getDisplay("bs") "       - " ansi("bold", "bs") "  │ " \
-            getDisplay("ja") "           - " ansi("bold", "ja") " │ "   \
-            getDisplay("sl") " - " ansi("bold", "sl") "    │" RS        \
-            "│ " getDisplay("ca") "         - " ansi("bold", "ca") "  │ " \
-            getDisplay("jv") "        - " ansi("bold", "jv") " │ "      \
-            getDisplay("so") "    - " ansi("bold", "so") "    │" RS     \
-            "│ " getDisplay("ceb") "        - " ansi("bold", "ceb") " │ " \
-            getDisplay("ka") "          - " ansi("bold", "ka") " │ "    \
-            getDisplay("sq") "       - " ansi("bold", "sq") "    │" RS  \
-            "│ " getDisplay("cs") "        - " ansi("bold", "cs") "  │ " \
-            getDisplay("kk") "       - " ansi("bold", "kk") " │ "       \
-            getDisplay("sr") "      - " ansi("bold", "sr") "    │" RS   \
-            "│ " getDisplay("cy") "        - " ansi("bold", "cy") "  │ " \
-            getDisplay("km") "         - " ansi("bold", "km") " │ "     \
-            getDisplay("st") "     - " ansi("bold", "st") "    │" RS    \
-            "│ " getDisplay("da") "          - " ansi("bold", "da") "  │ " \
-            getDisplay("kn") "             - " ansi("bold", "kn") " │ " \
-            getDisplay("su") "  - " ansi("bold", "su") "    │" RS       \
-            "│ " getDisplay("de") "        - " ansi("bold", "de") "  │ " \
-            getDisplay("ko") "           - " ansi("bold", "ko") " │ "   \
-            getDisplay("sv") "     - " ansi("bold", "sv") "    │" RS    \
-            "│ " getDisplay("el") "       - " ansi("bold", "el") "  │ " \
-            getDisplay("la") "           - " ansi("bold", "la") " │ "   \
-            getDisplay("sw") "   - " ansi("bold", "sw") "    │" RS      \
-            "│ " getDisplay("en") "        - " ansi("bold", "en") "  │ " \
-            getDisplay("lo") "              - " ansi("bold", "lo") " │ " \
-            getDisplay("ta") "        - " ansi("bold", "ta") "    │" RS \
-            "│ " getDisplay("eo") "      - " ansi("bold", "eo") "  │ "  \
-            getDisplay("lt") "         - " ansi("bold", "lt") " │ "     \
-            getDisplay("te") "       - " ansi("bold", "te") "    │" RS  \
-            "│ " getDisplay("es") "        - " ansi("bold", "es") "  │ " \
-            getDisplay("lv") "         - " ansi("bold", "lv") " │ "     \
-            getDisplay("tg") "      - " ansi("bold", "tg") "    │" RS   \
-            "│ " getDisplay("et") "          - " ansi("bold", "et") "  │ " \
-            getDisplay("mg") "         - " ansi("bold", "mg") " │ "     \
-            getDisplay("th") "         - " ansi("bold", "th") "    │" RS \
-            "│ " getDisplay("eu") "        - " ansi("bold", "eu") "  │ " \
-            getDisplay("mi") "            - " ansi("bold", "mi") " │ "  \
-            getDisplay("tl") "     - " ansi("bold", "tl") "    │" RS    \
-            "│ " getDisplay("fa") "          - " ansi("bold", "fa") "  │ " \
-            getDisplay("mk") "       - " ansi("bold", "mk") " │ "       \
-            getDisplay("tr") "      - " ansi("bold", "tr") "    │" RS   \
-            "│ " getDisplay("fi") "          - " ansi("bold", "fi") "  │ " \
-            getDisplay("ml") "           - " ansi("bold", "ml") " │ "   \
-            getDisplay("uk") "  - " ansi("bold", "uk") "    │" RS       \
-            "│ " getDisplay("fr") "       - " ansi("bold", "fr") "  │ " \
-            getDisplay("mn") "           - " ansi("bold", "mn") " │ "   \
-            getDisplay("ur") "        - " ansi("bold", "ur") "    │" RS \
-            "│ " getDisplay("ga") "        - " ansi("bold", "ga") "  │ " \
-            getDisplay("mr") "            - " ansi("bold", "mr") " │ "  \
-            getDisplay("uz") " - " ansi("bold", "uz") "    │" RS        \
-            "│ " getDisplay("gl") "         - " ansi("bold", "gl") "  │ " \
-            getDisplay("ms") "    - " ansi("bold", "ms") " │ "          \
-            getDisplay("vi") "  - " ansi("bold", "vi") "    │" RS       \
-            "│ " getDisplay("gu") "         - " ansi("bold", "gu") "  │ " \
-            getDisplay("mt") "            - " ansi("bold", "mt") " │ "  \
-            getDisplay("yi") "       - " ansi("bold", "yi") "    │" RS  \
-            "│ " getDisplay("ha") "          - " ansi("bold", "ha") "  │ " \
-            getDisplay("my") "          - " ansi("bold", "my") " │ "    \
-            getDisplay("yo") "      - " ansi("bold", "yo") "    │" RS   \
-            "│ " getDisplay("he") "          - " ansi("bold", "he") "  │ " \
-            getDisplay("ne") "            - " ansi("bold", "ne") " │ "  \
-            getDisplay("zh-CN") "    - " ansi("bold", "zh-CN") " │" RS  \
-            "│ " getDisplay("hi") "          - " ansi("bold", "hi") "  │ " \
-            getDisplay("nl") "       - " ansi("bold", "nl") " │ "       \
-            getDisplay("zh-TW") "    - " ansi("bold", "zh-TW") " │" RS  \
-            "│ " getDisplay("hmn") "          - " ansi("bold", "hmn") " │ " \
-            getDisplay("no") "            - " ansi("bold", "no") " │ "  \
-            getDisplay("zu") "     - " ansi("bold", "zu") "    │" RS    \
-            "│ " getDisplay("hr") "       - " ansi("bold", "hr") "  │ " \
-            getDisplay("ny") "           - " ansi("bold", "ny") " │ "   \
-            "                    │" RS                                  \
-            "│ " getDisplay("ht") " - " ansi("bold", "ht") "  │ "       \
-            getDisplay("pa") "            - " ansi("bold", "pa") " │ "  \
-            "                    │" RS                                  \
-            "└──────────────────────┴───────────────────────┴─────────────────────┘"
+function getReference(displayName,
+                      ####
+                      code, col, cols, i, j, name, rows, r, saveSortedIn, t, tt) {
+    rows = int(length(Locale) / 3) + 1
+    cols[0][0] = cols[1][0] = cols[2][0] = NULLSTR
+    i = 0
+    saveSortedIn = PROCINFO["sorted_in"]
+    PROCINFO["sorted_in"] = displayName == "endonym" ? "@ind_num_asc" :
+        "compName"
+    for (code in Locale) {
+        col = int(i / rows)
+        append(cols[col], code)
+        i++
+    }
+    PROCINFO["sorted_in"] = saveSortedIn
+
+    if (displayName == "endonym") {
+        r = "┌" replicate("─", 22) "┬" replicate("─", 23) "┬" replicate("─", 23) "┐" RS
+        for (i = 0; i < rows; i++) {
+            r = r "│ "
+            for (j = 0; j < 3; j++) {
+                if (cols[j][i]) {
+                    t = cols[j][i] == "he" ||
+                        cols[j][i] == "hi" ||
+                        cols[j][i] == "hu" ||
+                        cols[j][i] == "la" ||
+                        cols[j][i] == "ml" ||
+                        cols[j][i] == "mn" ||
+                        cols[j][i] == "ne" ||
+                        cols[j][i] == "ny" ||
+                        cols[j][i] == "pa" ||
+                        cols[j][i] == "pl" ||
+                        cols[j][i] == "ro" ||
+                        cols[j][i] == "sr" ||
+                        cols[j][i] == "te" ||
+                        cols[j][i] == "tg" ||
+                        cols[j][i] == "tr" ||
+                        cols[j][i] == "ur" ||
+                        cols[j][i] == "yi" ||
+                        cols[j][i] == "yo" ||
+                        (cols[j][i] != "zh-CN" && cols[j][i] != "zh-TW" &&
+                         length(getEndonym(cols[j][i])) < 6) ? "\t\t " :
+                        cols[j][i] == "ht" ? " " :
+                        cols[j][i] == "id" ? "" :
+                        "\t "
+                    tt = length(cols[j][i]) == 3 ? " │" :
+                        (cols[j][i] != "zh-CN" && cols[j][i] != "zh-TW") ? "  │" : ""
+                    r = r getDisplay(cols[j][i]) t "- " ansi("bold", cols[j][i]) tt " "
+                } else
+                    r = r "\t\t       │"
+            }
+            r = r RS
+        }
+        r = r "└" replicate("─", 22) "┴" replicate("─", 23) "┴" replicate("─", 23) "┘"
+    } else {
+        r = "┌" replicate("─", 22) "┬" replicate("─", 23) "┬" replicate("─", 23) "┐" RS
+        for (i = 0; i < rows; i++) {
+            r = r "│ "
+            for (j = 0; j < 3; j++) {
+                if (cols[j][i]) {
+                    t = cols[j][i] == "he" ||
+                        cols[j][i] == "kk" ||
+                        cols[j][i] == "ko" ||
+                        cols[j][i] == "ne" ||
+                        cols[j][i] == "pl" ||
+                        cols[j][i] == "sk" ||
+                        cols[j][i] == "so" ||
+                        cols[j][i] == "te" ||
+                        cols[j][i] == "yo" ||
+                        (cols[j][i] != "zh-CN" && cols[j][i] != "zh-TW" &&
+                         length(getName(cols[j][i])) < 6) ? "\t\t " :
+                        cols[j][i] == "ht" ? " " :
+                        "\t "
+                    tt = length(cols[j][i]) == 3 ? " │" :
+                        (cols[j][i] != "zh-CN" && cols[j][i] != "zh-TW") ? "  │" : ""
+                    name = getName(cols[j][i])
+                    if (cols[j][i] == "zh-CN" ||
+                        cols[j][i] == "zh-TW")
+                        name = substr(name, 1, 12) "."
+                    r = r name t "- " ansi("bold", cols[j][i]) tt " "
+                } else
+                    r = r "\t\t       │"
+            }
+            r = r RS
+        }
+        r = r "└" replicate("─", 22) "┴" replicate("─", 23) "┴" replicate("─", 23) "┘"
+    }
+    return r
 }

 # Return detailed information of languages as a string.


gofrontend: deduplicate C syscall function declarations

A gccgo language extension allows a function to be declared multiple
times. Avoid the use of this extension by dedeplicating declarations
in mksyscall.awk.

R=iant
CC=gofrontend-dev
https://golang.org/cl/89130043

--- libgo/go/syscall/mksyscall.awk
+++ libgo/go/syscall/mksyscall.awk
@@ -96,8 +96,11 @@
     cfnresult = line

     printf("// Automatically generated wrapper for %s/%s\n", gofnname, cfnname)
-    printf("//extern %s\n", cfnname)
-    printf("func c_%s(%s) %s\n", cfnname, cfnparams, cfnresult)
+    if (!(cfnname in cfns)) {
+        cfns[cfnname] = 1
+        printf("//extern %s\n", cfnname)
+        printf("func c_%s(%s) %s\n", cfnname, cfnparams, cfnresult)
+    }
     printf("func %s(%s) %s%s%s%s{\n",
 	   gofnname, gofnparams, gofnresults == "" ? "" : "(", gofnresults,
 	   gofnresults == "" ? "" : ")", gofnresults == "" ? "" : " ")


Delete silly AWK version.

Delete silly AWK version.

--- bench/gawk/src/csv_project3.awk
+++ bench/gawk/src/csv_project3.awk
@@ -1,31 +0,0 @@
-#!/bin/sh
-REALLY_UGLY_SHEBANG_HACK==0 "exec" "gawk" "-f" "$0" "$@"
-
-# Awk version of the "csv_project3" program.
-BEGIN {
-    # Always pick the GNU date function, so we can get nanosec precision.
-    # If installed via coreutils with Macports on OS X, it is called gdate.
-    "uname" | getline uname
-    if (uname == "Darwin")
-        date = "gdate"
-    else
-        date = "date"
-    date " +%s%N | cut -b1-13" |& getline start
-
-    regex="^([^,\n]*),([^,\n]*),([^,\n]*),([^,\n]*),([^,\n]*),([^,\n]*)$"
-}
-
-match($0, regex, m) {
-    print m[2] "\t" m[5]
-}
-$0 !~ regex {
-     printf "match error!\n"
-     exit 1
-}
-
-END {
-    date " +%s%N | cut -b1-13" | getline end
-    elaps = end - start
-    print "\nmatching (ms): " elaps > "/dev/stderr"
-
-}


Fix tailrecurse test

Fix tailrecurse test

* GoAWK doesn't have non-POSIX length(array) support
* We don't correctly parse "! c--" right now (see other skipped tests)
* Accessing B[""] doesn't set it (right now)

--- testdata/gawk/tailrecurse.awk
+++ testdata/gawk/tailrecurse.awk
@@ -3,13 +3,20 @@
 }

+function array_length(a,   k, n) {
+    n = 0
+    for (k in a) n++
+    return n
+}
+
 function abc(c, A, B)
 {
-	print "abc(" c ", " length(A) ")"
-	if (! c--) {
+	print "abc(" c ", " array_length(A) ")"
+	if (!c) {
 		return
 	}
-	B[""]
-	print length(B)
+    c--
+	B[""] = 1
+	print array_length(B)
 	return abc(c, B)
 }


use default encoding (8859-1) for automat-SIP communicatin

--- files/templates/instance/SIPconfig.template_automats.awk
+++ files/templates/instance/SIPconfig.template_automats.awk
@@ -2,7 +2,7 @@
   FS=","
 }
 {
-	print "\t<login encoding=\"utf8\" id=\""$1"\" password=\""$2"\" delimiter=\"|\" error-detect=\"enabled\" institution=\""$3"\" checked_in_ok=\"1\">"
+	print "\t<login id=\""$1"\" password=\""$2"\" delimiter=\"|\" error-detect=\"enabled\" institution=\""$3"\" checked_in_ok=\"1\">"
 	print "\t\t<!-- General messages -->"
 	print "\t\t<screen_msg_regex find=\"^.*Invalid password.*$\" replace=\"Feil passord\" />"
 	print "\t\t<!-- Checkout screen messages we can translate directly -->"


POSIX { and delete
TODO: still not POSIX compatible due to "match()"

git-svn-id: 88e1a00e4eab3b0bb0c09889526309a3e2f5bd8a@23 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

--- mkstructinfo.awk
+++ mkstructinfo.awk
@@ -2,7 +2,6 @@
 # vim:ts=4:sw=4
 BEGIN {
 	brace = 0;
-	delete buffer;
 	buffer_len = 0;
 }
 /^}.*;/ {
@@ -33,14 +32,16 @@
 		printf "define(`COUNTOF_%s', `%s')\n", instruct, i;
 		printf "define(`SIZEOF_%s', `(  %s  )')\n", instruct, elm;
 		print "\n";
-		delete buffer;
+		for (i in buffer) {
+			delete buffer[i];
+		}
 		buffer_len = 0;
 		instruct = 0;
 	}
 	next;
 }

-/.{/ {
+/.\{/ {
 	brace = brace + 1;
 }
 /.}/ {
@@ -75,13 +76,13 @@
 	typedefs[$3] = $4;
 	next;
 }
-/^typedef struct .*{/ {
+/^typedef struct .*\{/ {
 	brace = 1;
 	instruct = 1;
 	next;
 }

-/^struct .*{/ {
+/^struct .*\{/ {
 	instruct = $2;
 	brace = 1;
 	next;


Translators/GoogleTranslate: hint for autocorrection and handle -no-autocorrect option

--- include/Translators/GoogleTranslate.awk
+++ include/Translators/GoogleTranslate.awk
@@ -52,11 +52,12 @@
     HttpPort = 80
 }

-function googleRequestUrl(text, sl, tl, hl) {
+function googleRequestUrl(text, sl, tl, hl,    qc) {
+    qc = Option["no-autocorrect"] ? "qc" : "qca";
     return HttpPathPrefix "/translate_a/single?client=gtx"              \
         "&ie=UTF-8&oe=UTF-8"                                            \
-        "&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&dt=at"  \
-        "&sl=" sl "&tl=" tl "&hl=" hl                                   \
+        "&dt=bd&dt=ex&dt=ld&dt=md&dt=rw&dt=rm&dt=ss&dt=t&dt=at"         \
+        "&dt=" qc "&sl=" sl "&tl=" tl "&hl=" hl                         \
         "&q=" preprocess(text)
 }

@@ -148,6 +149,10 @@
         if (match(i, "^0" SUBSEP "5" SUBSEP "([[:digit:]]+)" SUBSEP "2" SUBSEP "([[:digit:]]+)" SUBSEP "0$", group))
             altTranslations[group[1]][group[2]] = postprocess(literal(ast[i]))

+        # 7 - autocorrection
+        if (i ~ "^0" SUBSEP "7" SUBSEP "5$")
+            w("Showing translation for:  (use -no-auto to disable autocorrect)")
+
         # 8 - identified source languages
         if (i ~ "^0" SUBSEP "8" SUBSEP "0" SUBSEP "[[:digit:]]+$" ||
             i ~ "^0" SUBSEP "2$")


Commons: add SUPOUT

Commons: add SUPOUT

--- include/Commons.awk
+++ include/Commons.awk
@@ -10,7 +10,8 @@
     STDOUT = "/dev/stdout"
     STDERR = "/dev/stderr"

-    SUPERR = " 2> /dev/null" # suppress errors
+    SUPOUT = " > /dev/null "  # suppress output
+    SUPERR = " 2> /dev/null " # suppress error
 }

 # Initialize `UrlEncoding`.


Better output flushing, maybe?

Better output flushing, maybe?

--- xcodebuild.awk
+++ xcodebuild.awk
@@ -3,6 +3,10 @@
 # 0 - No errors found.
 # 1 - Build or test failure. Errors will be logged automatically.
 # 2 - Untestable target. Retry with the "build" action.
+
+BEGIN {
+    status = 0;
+}

 {
     print;
@@ -15,13 +19,18 @@

 /[0-9]+: (error|warning):/ {
     errors = errors $0 "\n";
+    status = 1;
 }

 /(TEST|BUILD) FAILED/ {
+    status = 1;
+}
+
+END {
     if (length(errors) > 0) {
         print "\n*** All errors:\n" errors;
     }

     fflush(stdout);
-    exit 1;
+    exit status;
 }


Explicitly discard refSink() result

Explicitly discard refSink() result

--- GObject-2.0.awk
+++ GObject-2.0.awk
@@ -16,7 +16,7 @@
   if (unowned) {
     unowned = 0
     print
-    print "        refSink()"
+    print "        _ = refSink()"
     next
   }
 }


added bundledby, equiv_prop, sub_prop, range_template, range_name to eparams template

--- bin/util/header2params2.awk
+++ bin/util/header2params2.awk
@@ -222,10 +222,19 @@
    if(length(conversionID)) {
       # NOTE: This MUST NOT be added to the raw interpretation parameters,
       #       otherwise columns will collapse together prematurely (with human approval).
+      printf("         #conversion:bundled_by [ ov:csvCol 1 ];\n");
       printf("         #conversion:label   \"%s\";\n",cellValue);
+      printf("         #conversion:equivalent_property dcterms:identifier;\n");
+      printf("         #conversion:subproperty_of      dcterms:identifier;\n");
    }
    printf("         conversion:comment \"\";\n");
+   if(length(conversionID)) {
+      printf("         #conversion:range_template  \"[/sd]thing[.]\";\n");
+   }
    printf("         conversion:range   %s:Literal;\n",RDFS); # Either 'rdfs' or 'todo' (for raw and e*, respectively)
+   if(length(conversionID)) {
+      printf("         #conversion:range_name  \"Thing\";\n");
+   }
    if(length(conversionID)) {
       if( length(onlyIfCol) && onlyIfCol == i ) {
          print "         a conversion:Only_if_column;"


Ignore a sub-topic match if it is inside the command description.
Otherwise, merge-help can get confused by a command description that
includes a word that starts with a capital S.

MFC after:	1 week


get_vectors script updated to avoid collisions between relevant and randomly chosen tokens

(cherry picked from commit f4a343775778d675c2b626e3565a2cde9230114b)

--- scripts/get_vectors.awk
+++ scripts/get_vectors.awk
@@ -2,31 +2,42 @@

 ##################################################################
 BEGIN {
-    if (ARGC != 3) {
-	printf("Incorrect number of arguments.") > "/dev/stderr"
+    if (ARGC != 4) {
+	printf("Incorrect number of arguments.") > "/sys/stderr"
 	exit 1
     }

+    ret = 0
+    WCL = 0 + ARGV[1]
     # obtain words to fetch
-    ifile = ARGV[1]
+    ifile = ARGV[2]
     while ((ret = (getline < ifile)) > 0) {
 	if (!NF)
 	    continue
-
-        gsub(/[[:space:]]+$/, "")
-        gsub(/^[[:space:]]+/, "")
-        if ($0 in WORD2SEEK)
+	# else if (NF != 2) {
+	#     printf("Incorrect line format: %s", $0) > "/sys/stderr"
+	#     exit 2
+	# }
+        $1 = tolower($1)
+        if ($1 in WORD2SEEK)
           continue

-	WORD2SEEK[$0] = ""
+	WORD2SEEK[$1] = ""
         ++w_cnt
     }
-    ARGV[1] = ""
+    ARGV[1] = ARGV[2] = ""
+    # obtain random line numbers to fetch
+    srand()
+    wcl = WCL > 1? WCL - 1: 0
+    for (i = 1; i < WCL; ++i) {
+	randarr[i] = rand() * wcl + 1
+    }
+    asorti(randarr, tmparr)
+    wcl = WCL / 500
+    for (i = 1; i < wcl; ++i) {
+	FNR2SEEK[tmparr[i]] = ""
+    }
 }

 ##################################################################
-NF && FNR > 1 && ($1 in WORD2SEEK) {
-  print $0
-  if (--w_cnt <= 0)
-    exit
-}
+NF && FNR > 1 && ($1 in WORD2SEEK || FNR in FNR2SEEK)


aux/ematch.awk: slightly simplify bounds expansion code

--- lib/modernish/aux/ematch.awk
+++ lib/modernish/aux/ematch.awk
@@ -184,6 +184,7 @@
 		} else if (c == "{" && match(substr(ere, i+1, 1), /[0123456789]/)) {
 			# Interval expression, a.k.a. repetition expression, a.k.a. bound.
 			# Expand it in terms of the repetition operators '*', '+' and '?'.
+			piece = "";
 			isave = i;
 			b = 1;		# number of bound params
 			m = ""; n = "";	# bound params
@@ -203,16 +204,14 @@
 				errorout("bound: too many parameters", ere, isave);
 			if (b == 1) {
 				# {m}: exactly m occurrences
-				piece = "";
 				for (j = 1; j <= m; j++)
 					piece = (piece)(atom);
 			} else if (n == "") {
 				# {m,}: at least m occurrences
-				piece = atom;
 				if (m == 0) {
-					piece = (piece)("*");
+					piece = (atom)("*");
 				} else {
-					for (j = 2; j <= m; j++)
+					for (j = 1; j <= m; j++)
 						piece = (piece)(atom);
 					piece = (piece)("+");
 				}
@@ -220,7 +219,6 @@
 				# {m,n}: any number of occurrences between m and n, inclusive
 				if (n < m)
 					errorout("bad bound: max < min", ere, isave);
-				piece = "";
 				for (j = 1; j <= m; j++)
 					piece = (piece)(atom);
 				for (; j <= n; j++)


"-1" -> "PCMCIA_PRODUCT_INVALID"

"-1" -> "PCMCIA_PRODUCT_INVALID"

--- dev/pcmcia/devlist2h.awk
+++ dev/pcmcia/devlist2h.awk
@@ -1,5 +1,5 @@
 #! /usr/bin/awk -f
-#	$OpenBSD: devlist2h.awk,v 1.2 1999/04/30 07:28:25 fgsch Exp $
+#	$OpenBSD: devlist2h.awk,v 1.3 1999/08/18 22:30:04 d Exp $
 #	$NetBSD: devlist2h.awk,v 1.2 1998/07/22 11:47:13 christos Exp $
 #
 # Copyright (c) 1998, Christos Zoulas
@@ -99,7 +99,7 @@
 	f = 5;

 	if ($4 == "{") {
-		products[nproducts, 3] = -1
+		products[nproducts, 3] = "PCMCIA_PRODUCT_INVALID"
 		z = "{ "
 		for (i = 0; i < 4; i++) {
 			if (f <= NF) {


Languages: update section C

Languages: update section C

--- include/LanguageData.awk
+++ include/LanguageData.awk
@@ -276,9 +276,24 @@
     Locale["bg"]["spoken-in"]          = "Bulgaria"
     Locale["bg"]["supported-by"]       = "google; bing; yandex"

-
-
-    #12 Catalan (Standard Catalan)
+    # Cantonese
+    Locale["yue"]["name"]              = "Cantonese"
+    Locale["yue"]["endonym"]           = "粵語"
+    Locale["yue"]["endonym2"]          = "廣東話"
+    #Locale["yue"]["translations-of"]
+    #Locale["yue"]["definitions-of"]
+    #Locale["yue"]["synonyms"]
+    #Locale["yue"]["examples"]
+    #Locale["yue"]["see-also"]
+    Locale["yue"]["family"]            = "Sino-Tibetan"
+    Locale["yue"]["branch"]            = "Sinitic"
+    Locale["yue"]["iso"]               = "yue"
+    Locale["yue"]["glotto"]            = "cant1236"
+    Locale["yue"]["script"]            = "Hant"
+    Locale["yue"]["spoken-in"]         = "southeastern China; Hong Kong; Macau"
+    Locale["yue"]["supported-by"]      = "bing"
+
+    # Catalan (Standard Catalan)
     Locale["ca"]["name"]               = "Catalan"
     Locale["ca"]["endonym"]            = "Català"
     Locale["ca"]["translations-of"]    = "Traduccions per a %s"
@@ -287,11 +302,14 @@
     Locale["ca"]["examples"]           = "Exemples"
     Locale["ca"]["see-also"]           = "Vegeu també"
     Locale["ca"]["family"]             = "Indo-European"
+    Locale["ca"]["branch"]             = "Western Romance"
     Locale["ca"]["iso"]                = "cat"
     Locale["ca"]["glotto"]             = "stan1289"
     Locale["ca"]["script"]             = "Latn"
-
-    #13 Cebuano
+    Locale["ca"]["spoken-in"]          = "Països Catalans in Andorra, Spain, France and Italy"
+    Locale["ca"]["supported-by"]       = "google; bing; yandex"
+
+    # Cebuano
     Locale["ceb"]["name"]              = "Cebuano"
     Locale["ceb"]["endonym"]           = "Cebuano"
     Locale["ceb"]["translations-of"]   = "%s Mga Paghubad sa PULONG_O_HUGPONG SA PAMULONG"
@@ -300,12 +318,16 @@
     Locale["ceb"]["examples"]          = "Mga pananglitan:"
     Locale["ceb"]["see-also"]          = "Kitaa pag-usab"
     Locale["ceb"]["family"]            = "Austronesian"
+    Locale["ceb"]["branch"]            = "Malayo-Polynesian"
     Locale["ceb"]["iso"]               = "ceb"
     Locale["ceb"]["glotto"]            = "cebu1242"
     Locale["ceb"]["script"]            = "Latn"
-
-    #14 Chichewa
+    Locale["ceb"]["spoken-in"]         = "the southern Philippines"
+    Locale["ceb"]["supported-by"]      = "google; yandex"
+
+    # Chichewa
     Locale["ny"]["name"]               = "Chichewa"
+    Locale["ny"]["name2"]              = "Chinyanja"
     Locale["ny"]["endonym"]            = "Nyanja"
     Locale["ny"]["translations-of"]    = "Matanthauzidwe a %s"
     Locale["ny"]["definitions-of"]     = "Mamasulidwe a %s"
@@ -313,12 +335,34 @@
     Locale["ny"]["examples"]           = "Zitsanzo"
     Locale["ny"]["see-also"]           = "Onaninso"
     Locale["ny"]["family"]             = "Atlantic-Congo"
+    Locale["ny"]["branch"]             = "Bantu"
     Locale["ny"]["iso"]                = "nya"
     Locale["ny"]["glotto"]             = "nyan1308"
     Locale["ny"]["script"]             = "Latn"
-
-    #15a Chinese (Mandarin), Simplified
-    Locale["zh-CN"]["name"]            = "Chinese Simplified"
+    Locale["ny"]["spoken-in"]          = "Malawi; Zambia"
+    Locale["ny"]["supported-by"]       = "google"
+
+    # Chinese (Literary)
+    Locale["lzh"]["name"]              = "Chinese (Literary)"
+    #Locale["lzh"]["name2"]            = "Literary Chinese"
+    #Locale["lzh"]["name3"]            = "Classical Chinese"
+    Locale["lzh"]["endonym"]           = "文言"
+    Locale["lzh"]["endonym2"]          = "古漢語"
+    #Locale["lzh"]["translations-of"]
+    #Locale["lzh"]["definitions-of"]
+    #Locale["lzh"]["synonyms"]
+    #Locale["lzh"]["examples"]
+    #Locale["lzh"]["see-also"]
+    Locale["lzh"]["family"]            = "Sino-Tibetan"
+    Locale["lzh"]["branch"]            = "Sinitic"
+    Locale["lzh"]["iso"]               = "lzh"
+    Locale["lzh"]["glotto"]            = "lite1248"
+    Locale["lzh"]["script"]            = "Hans" # should actually be Hant
+    Locale["lzh"]["spoken-in"]         = "ancient China"
+    Locale["lzh"]["supported-by"]      = "bing"
+
+    # Chinese (Standard Mandarin), Simplified
+    Locale["zh-CN"]["name"]            = "Chinese (Simplified)"
     Locale["zh-CN"]["endonym"]         = "简体中文"
     Locale["zh-CN"]["translations-of"] = "%s 的翻译"
     Locale["zh-CN"]["definitions-of"]  = "%s的定义"
@@ -326,13 +370,17 @@
     Locale["zh-CN"]["examples"]        = "示例"
     Locale["zh-CN"]["see-also"]        = "另请参阅"
     Locale["zh-CN"]["family"]          = "Sino-Tibetan"
+    Locale["zh-CN"]["branch"]          = "Sinitic"
     Locale["zh-CN"]["iso"]             = "zho-CN"
     Locale["zh-CN"]["glotto"]          = "mand1415"
     Locale["zh-CN"]["script"]          = "Hans"
     Locale["zh-CN"]["dictionary"]      = "true" # has dictionary
-
-    #15b Chinese (Mandarin), Traditional
-    Locale["zh-TW"]["name"]            = "Chinese Traditional"
+    Locale["zh-CN"]["spoken-in"]       = "the Greater China regions"
+    Locale["zh-CN"]["written-in"]      = "mainland China; Singapore"
+    Locale["zh-CN"]["supported-by"]    = "google; bing; yandex"
+
+    # Chinese (Standard Mandarin), Traditional
+    Locale["zh-TW"]["name"]            = "Chinese (Traditional)"
     Locale["zh-TW"]["endonym"]         = "繁體中文"
     Locale["zh-TW"]["endonym2"]        = "正體中文"
     Locale["zh-TW"]["translations-of"] = "「%s」的翻譯"
@@ -341,12 +389,32 @@
     Locale["zh-TW"]["examples"]        = "例句"
     Locale["zh-TW"]["see-also"]        = "另請參閱"
     Locale["zh-TW"]["family"]          = "Sino-Tibetan"
+    Locale["zh-TW"]["branch"]          = "Sinitic"
     Locale["zh-TW"]["iso"]             = "zho-TW"
     Locale["zh-TW"]["glotto"]          = "mand1415"
     Locale["zh-TW"]["script"]          = "Hant"
     Locale["zh-TW"]["dictionary"]      = "true" # has dictionary
-
-    #16 Corsican
+    Locale["zh-TW"]["spoken-in"]       = "the Greater China regions"
+    Locale["zh-TW"]["written-in"]      = "Taiwan (Republic of China); Hong Kong; Macau"
+    Locale["zh-TW"]["supported-by"]    = "google; bing"
+
+    # Chuvash
+    Locale["cv"]["name"]               = "Chuvash"
+    Locale["cv"]["endonym"]            = "Чӑвашла"
+    #Locale["cv"]["translations-of"]
+    #Locale["cv"]["definitions-of"]
+    #Locale["cv"]["synonyms"]
+    #Locale["cv"]["examples"]
+    #Locale["cv"]["see-also"]
+    Locale["cv"]["family"]             = "Turkic"
+    Locale["cv"]["branch"]             = "Oghur"
+    Locale["cv"]["iso"]                = "chv"
+    Locale["cv"]["glotto"]             = "chuv1255"
+    Locale["cv"]["script"]             = "Cyrl"
+    Locale["cv"]["spoken-in"]          = "the Chuvash Republic in Russia"
+    Locale["cv"]["supported-by"]       = "yandex"
+
+    # Corsican
     Locale["co"]["name"]               = "Corsican"
     Locale["co"]["endonym"]            = "Corsu"
     Locale["co"]["translations-of"]    = "Traductions de %s"
@@ -355,11 +423,14 @@
     Locale["co"]["examples"]           = "Exemples"
     Locale["co"]["see-also"]           = "Voir aussi"
     Locale["co"]["family"]             = "Indo-European"
+    Locale["co"]["branch"]             = "Italo-Dalmatian"
     Locale["co"]["iso"]                = "cos"
-    Locale["co"]["glotto"]             = "cors1242"
+    Locale["co"]["glotto"]             = "cors1241"
     Locale["co"]["script"]             = "Latn"
-
-    #17 Croatian
+    Locale["co"]["spoken-in"]          = "Corsica in France; the northern end of the island of Sardinia in Italy"
+    Locale["co"]["supported-by"]       = "google"
+
+    # Croatian
     Locale["hr"]["name"]               = "Croatian"
     Locale["hr"]["endonym"]            = "Hrvatski"
     Locale["hr"]["translations-of"]    = "Prijevodi riječi ili izraza %s"
@@ -368,11 +439,14 @@
     Locale["hr"]["examples"]           = "Primjeri"
     Locale["hr"]["see-also"]           = "Također pogledajte"
     Locale["hr"]["family"]             = "Indo-European"
+    Locale["hr"]["branch"]             = "South Slavic"
     Locale["hr"]["iso"]                = "hrv"
     Locale["hr"]["glotto"]             = "croa1245"
     Locale["hr"]["script"]             = "Latn"
-
-    #18 Czech
+    Locale["hr"]["spoken-in"]          = "Croatia; Bosnia and Herzegovina"
+    Locale["hr"]["supported-by"]       = "google; bing; yandex"
+
+    # Czech
     Locale["cs"]["name"]               = "Czech"
     Locale["cs"]["endonym"]            = "Čeština"
     Locale["cs"]["translations-of"]    = "Překlad výrazu %s"
@@ -381,9 +455,14 @@
     Locale["cs"]["examples"]           = "Příklady"
     Locale["cs"]["see-also"]           = "Viz také"
     Locale["cs"]["family"]             = "Indo-European"
+    Locale["cs"]["branch"]             = "West Slavic"
     Locale["cs"]["iso"]                = "ces"
     Locale["cs"]["glotto"]             = "czec1258"
     Locale["cs"]["script"]             = "Latn"
+    Locale["cs"]["spoken-in"]          = "Czechia"
+    Locale["cs"]["supported-by"]       = "google; bing; yandex"
+
+

     #19 Danish
     Locale["da"]["name"]               = "Danish"
@@ -1869,15 +1948,6 @@
     Locale["zu"]["iso"]                = "zul"
     Locale["zu"]["glotto"]             = "zulu1248"
     Locale["zu"]["script"]             = "Latn"
-
-    #* Cantonese
-    Locale["yue"]["support"]           = "bing-only"
-    Locale["yue"]["name"]              = "Cantonese"
-    Locale["yue"]["endonym"]           = "粵語"
-    Locale["yue"]["family"]            = "Sino-Tibetan"
-    Locale["yue"]["iso"]               = "yue"
-    Locale["yue"]["glotto"]            = "cant1236"
-    Locale["yue"]["script"]            = "Hant"

     #* Dari (Dari Persian)
     Locale["prs"]["support"]           = "bing-only"


Adding license to template.awk

Adding license to template.awk

--- src/template.awk
+++ src/template.awk
@@ -1,4 +1,38 @@
 #! /usr/bin/env awk -f
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# Copyright © 2011, Damian Carrillo
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice, this
+#   list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+#   this list of conditions and the following disclaimer in the documentation
+#   and/or other materials provided with the distribution.
+# * Neither the name of the <organization> nor the names of its contributors
+#   may be used to endorse or promote products derived from this software
+#   without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# template.awk
+#
+# 2011-10-08
+#
+#
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 BEGIN {
     split(ARGV[1], components, "\/")


0 -> empty

0 -> empty

--- enhancement/fixedwidthsplit.awk
+++ enhancement/fixedwidthsplit.awk
@@ -10,7 +10,7 @@
 ## Splits the target string t into the array a on the width list string w, and
 ## returns the number of fields. If t is not supplied, $0 is used instead. The
 ## string w is splited on non-numeric characters. If the width of the last field
-## is 0, the rest of t is used.
+## is empty, the rest of t is used.
 ##
 function fixedwidthsplit(w, a, t,     _wa, _wn, _i, _k) {
     _wn = split(w, _wa, /[^[:digit:]]+/);


Closing files that are read from

Closing files that are read from

--- src/template.awk
+++ src/template.awk
@@ -89,6 +89,7 @@
     while ((getline line < tempScriptPath) > 0) {
         print line > scriptPath
     }
+    close(tempScriptPath)
 }

 function includeFragment(linePrefix, fragmentFile, fragmentLabel) {
@@ -96,6 +97,7 @@
         if (line ~ "@start-fragment " fragmentLabel) {
             while ((getline line < fragmentFile) > 0) {
                 if (line ~ "@end-fragment " fragmentLabel) {
+                    close(fragmentFile)
                     return
                 }
                 print line > tempScriptPath


Fix for right inclusion on last read pair


checkonly: wallet unlocking is not required anymore.

--- bittransacthelperawk.awk
+++ bittransacthelperawk.awk
@@ -690,12 +690,13 @@
 		if ((amount[i] == "") || (src[i] == ""))
 			readtransaction(i)
 		retrieveaddressscript(src[i])
+		if (checkonly) continue
 		if (src[i] ~ singleaddrheadregexp)
 			retrieveprivkey(src[i])
 		else if (src[i] ~ multiaddrheadregexp) {
 			if ((multisig[src[i], 0] != "") && (redeem[src[i]] != ""))
 				retrievemultisigprivkey(src[i])
-			else if (! checkonly)
+			else
 				genwarning("Input " i " signing is skipped, you should provide '" src[i] "' participants")
 		}
 	}


e-params-update.awk handles updating the URI of the versioned dataset

--- bin/util/e-params-increment.awk
+++ bin/util/e-params-increment.awk
@@ -1,9 +1,17 @@
 # e-params-increment.awk
 # params: eID

+
 {
    # TODO: change the URI of the dataset, too.
-   if( $0~"conversion:enhancement_identifier" ) {
+   if(/^@prefix : /){
+      # change
+      # @prefix :           <http://logd.tw.rpi.edu/source/nitrd-gov/dataset/fed_RD_IT/version/2011-Jan-27/conversion/enhancement/1> .
+      # to
+      # @prefix :           <http://logd.tw.rpi.edu/source/nitrd-gov/dataset/fed_RD_IT/version/2011-Jan-27/conversion/enhancement/2> .
+      sub(/enhancement\/[^\/]*$/,"enhancement/"eID"> .");
+      print $0
+   }else if( $0~"conversion:enhancement_identifier" ) {
       printf("      conversion:enhancement_identifier \"%s\";\n",eID)}
    else {
       print


missing newline at the end of usage files

--- usage2c.awk
+++ usage2c.awk
@@ -37,6 +37,6 @@
     printf("  fprintf(out, %s", command_name);
     for (i = 1; i <= progs; i++)
         printf(", argv0");
-    printf(");\n}");
+    print(");\n}");
 }


comment on which file goes first & second

--- scripts/deltadot.awk
+++ scripts/deltadot.awk
@@ -1,18 +1,20 @@
 #! /usr/bin/awk -f
-#deltadot.awk
-# Use to illuminate the commonality and differences between dot files created
-# by 'ntriples2dot.awk' but might work for other dot files
-
-# expects two graphviz dot digraph files
+#deltadot.awk <encumbant.gv> <candidate.gv>
+# Use to illuminate the commonality and differences between dot files created
+# by 'ntriples2dot.awk' but might work for other dot files
+#
+#
+# expects two graphviz dot digraph files by convention "old"  then "new"
+# for color to mean;  orange lost in "new" and blue gained in "new"
 # with simple node names ('C' variable naming conventions)
-# edge's unadorned predicate label
-# concludes with a space then count in parens
+# edge's unadorned predicate label
+# concludes with a space then count in parens
 #
-# For example:
+# For example:
 # NODE1 -> NODE2 [label="curie:term (42)"];
 #
 # filter for edges in each file associate the count with the edge
-# if an edge is common between the files
+# if an edge is common between the files
 # then change its "count" to the difference. (second minus first)
 # otherwise leave count as is

@@ -22,7 +24,7 @@
 	arr[a[1]] = substr(a[2], 1, index(a[2], ")")-1)
 }

-# strip metadata from filename
+# strip metadata from filename
 function de_path_ext(pth){
 	split(pth, a, "/")
 	return substr(a[length(a)], 1, index(a[length(a)], ".")-1)


Add statuses.

Add statuses.

git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@35180 4f837ed2-42f5-46e7-a7a5-fa17313484d4

--- scripts/tdb/statuses_clockss.awk
+++ scripts/tdb/statuses_clockss.awk
@@ -52,29 +52,35 @@
   s[1] = "exists"
   s[2] = "manifest"
   s[3] = "wanted"
-  s[4] = "crawling"
-  s[5] = "testing"
-  s[6] = "notReady"
-  s[7] = "released"
-  s[8] = "down"
-  s[9] = "superseded"
-  s[10] = "zapped"
-  s[11] = "doNotProcess"
-  sn = 12
+  s[4] = "testing"
+  s[5] = "notReady"
+  s[6] = "ready"
+  s[7] = "crawling"
+  s[8] = "frozen"
+  s[9] = "ingNotReady"
+  s[10] = "finished"
+  s[11] = "down"
+  s[12] = "superseded"
+  s[13] = "zapped"
+  s[14] = "doNotProcess"
+  sn = 15

   sc[0] = "expe"
   sc[1] = "exis"
   sc[2] = "mani"
   sc[3] = "want"
-  sc[4] = "craw"
-  sc[5] = "test"
-  sc[6] = "notR"
-  sc[7] = "rele"
-  sc[8] = "down"
-  sc[9] = "supe"
-  sc[10] = "zapp"
-  sc[11] = "doNP"
-  scn = 12
+  sc[4] = "test"
+  sc[5] = "notR"
+  sc[6] = "read"
+  sc[7] = "craw"
+  sc[8] = "froz"
+  sc[9] = "ingN"
+  sc[10] = "fini"
+  sc[11] = "down"
+  sc[12] = "supe"
+  sc[13] = "zapp"
+  sc[14] = "doNP"
+  scn = 15

   #print out header
   printf "Publisher\tPlugin\tContr\tBack\tYear\tT\tTotal"


Correcting if statement

Correcting if statement

git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@24004 4f837ed2-42f5-46e7-a7a5-fa17313484d4

--- scripts/tdb/statuses_clockss.awk
+++ scripts/tdb/statuses_clockss.awk
@@ -10,10 +10,10 @@
   # add a loop to add line only if ending year is gt or eq to contract year
   end_year = 0
   incontract = 0
-  if ($7 != "") {
+  if ($7 == "") {
+    test_year = $3
+  } else {
     test_year = $7
-  } else {
-    test_year = $3
   }
   if (length($4) > 3) {
     end_year = substr($4,length($4)-3,4)


change compare and title heads

change compare and title heads

git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@22152 4f837ed2-42f5-46e7-a7a5-fa17313484d4

--- scripts/tdb/statuses_clockss.awk
+++ scripts/tdb/statuses_clockss.awk
@@ -8,7 +8,17 @@

 {
   # add a loop to add line only if ending year is gt or eq to contract year
-  if ((substr($4,1,4) >= $3) || ((length($4) == 9) && (substr($4,6,4) >= $3))) {
+  end_year = 0
+  incontract = 0
+  if (length($4) > 3) {
+    end_year = substr($4,length($4)-3,4)
+  }
+  if (end_year >= $3) {
+    incontract = 1
+  }
+
+  #if ((substr($4,1,4) >= $3) || ((length($4) == 9) && (substr($4,6,4) >= $3))) {
+  if (incontract == 1) {
       nn = split($2,na,/\./)
       lp2 = na[nn]
     if (!(($1,lp2,$3,$4) in b)) {


devtools: fix comment detection in forbidden token check

After a comment section was detected, passing to a new hunk was not seen
as ending the section and all subsequent hunks were ignored.

Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")
Cc: stable@dpdk.org

Reported-by: Thomas Monjalon <5f50a84c1fa3bcff146405017f36aec1a10a9e38@monjalon.net>
Signed-off-by: David Marchand <f28529695cfa9e3e1eb84e7072aa626af4abb18e@redhat.com>

--- devtools/check-forbidden-tokens.awk
+++ devtools/check-forbidden-tokens.awk
@@ -20,6 +20,9 @@
 # state machine assumes the comments structure is enforced by
 # checkpatches.pl
 (in_file) {
+	if ($0 ~ "^@@") {
+		in_comment = 0
+	}
 	# comment start
 	if (index($0,comment_start) > 0) {
 		in_comment = 1


Capture all build/test errors and print them at the end

--- xcodebuild.awk
+++ xcodebuild.awk
@@ -3,7 +3,14 @@
     fflush(stdout)
 }

+/[0-9]+: error:/ {
+    errors = errors $0 "\n"
+}
+
 /(TEST|BUILD) FAILED/ {
+    print "\n", errors
+    fflush(stdout)
+
     # SYS_SOFTWARE
     exit 70
 }


geo_utils.awk		-- renamed h_style, style to h_size, size as they set the marker size not it's style

--- lib/geo_utils.awk
+++ lib/geo_utils.awk
@@ -79,9 +79,9 @@
 		}
 	}
 }
-function GU_mk_point(file, color, style, long, lat, title, last,   h_color, h_style) {
+function GU_mk_point(file, color, size, long, lat, title, last,   h_color, h_size) {
  	h_color = color != "."
-	h_style = style != "."
+	h_size = size != "."
  	printf("{\n")									> file
  	printf("  \"type\": \"Feature\",\n")						> file
  	printf("  \"geometry\": {")							> file
@@ -91,9 +91,9 @@
  	printf("  \"properties\": {\n")							> file
  	printf("    \"title\": \"%s\",\n", GU_str_escape(title))			> file
 	if(h_color)
-		printf("    \"marker-color\": \"%s\"%s\n", color, h_style ? "," : "")	> file
-	if(h_style)
-		printf("    %s\n", style)						> file
+		printf("    \"marker-color\": \"%s\"%s\n", color, h_size ? "," : "")	> file
+	if(h_size)
+		printf("    %s\n", size)						> file
 	printf("  }\n")									> file
 	printf("}%s\n", !last ? "," : "")						> file
 }


Correct error in number of variables printed

git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@23940 4f837ed2-42f5-46e7-a7a5-fa17313484d4

--- scripts/tdb/statuses_clockss.awk
+++ scripts/tdb/statuses_clockss.awk
@@ -81,7 +81,7 @@

   #print out publisher, plugin, contract year, back, year, tester, total aus
   for (i = 0 ; i < pn ; i++) {
-    printf "%s\t%s\t%s\t%s\t%s\t%d", p[i], n[i], t[i], k[i], d[i], r[i], b[p[i],n[i],t[i],d[i]]
+    printf "%s\t%s\t%s\t%s\t%s\t%s\t%d", p[i], n[i], t[i], k[i], d[i], r[i], b[p[i],n[i],t[i],d[i]]
     for (j = 0 ; j < sn ; j++) {
       if (x[s[j]] > 0){
       if (c[p[i],n[i],t[i],k[i],d[i],s[j]] == 0) {


Help: update

Help: update


added script to parse gtf files for a particular gene

--- Shell/cuffdiff.awk
+++ Shell/cuffdiff.awk
@@ -26,3 +26,7 @@

 #output for fpkm tracking a particular gene
 awk '$5 == "PIKFYVE"{ print  }' isoforms.fpkm_tracking
+
+#screens a merged.gtf file for mention of a particular gene and saves it to pikfyve.gtf
+cat merged.gtf | grep "Pikfyve" > pikfyve.gtf
+


Changes for new SMP-safe kobj method dispatch algorithm.

--- sys/tools/makeobjops.awk
+++ sys/tools/makeobjops.awk
@@ -283,7 +283,7 @@
 	firstvar = varnames[1];

 	if (default == "")
-		default = "0";
+		default = "kobj_error_method";

 	# the method description
 	printh("extern struct kobjop_desc " mname "_desc;");
@@ -293,8 +293,12 @@
 	    line_width, length(prototype)));

 	# Print out the method desc
+	printc("struct kobj_method " mname "_method_default = {");
+	printc("\t&" mname "_desc, (kobjop_t) " default);
+	printc("};\n");
+
 	printc("struct kobjop_desc " mname "_desc = {");
-	printc("\t0, (kobjop_t) " default);
+	printc("\t0, &" mname "_method_default");
 	printc("};\n");

 	# Print out the method itself


droid

droid

--- bin/util/cr-droid.awk
+++ bin/util/cr-droid.awk
@@ -23,7 +23,10 @@
       print "<"container">"
       print "   dcterms:hasPart <"container"/"contained">;"
       print "."
-      print "<"container"/"contained"> dcterms:format <http://provenanceweb.org/formats/pronom/"format"> ."
+      print "<"container"/"contained">"
+      print "   dcterms:isPartOf <"container">;"
+      print "   dcterms:format   <http://provenanceweb.org/formats/pronom/"format">;"
+      print "."
       print ""

    } else {


pronom Unknown

pronom Unknown

--- bin/util/cr-droid.awk
+++ bin/util/cr-droid.awk
@@ -25,7 +25,9 @@
       print "."
       print "<"container"/"contained">"
       print "   dcterms:isPartOf <"container">;"
-      print "   dcterms:format   <http://provenanceweb.org/formats/pronom/"format">;"
+      if( tolower(format) != "unknown" ) {
+         print "   dcterms:format   <http://provenanceweb.org/formats/pronom/"format">;"
+      }
       print "."
       print ""


MInor formatting cleanup

MInor formatting cleanup

--- generateLinkFrom-text.awk
+++ generateLinkFrom-text.awk
@@ -18,6 +18,7 @@
 /ref=stream_prime/ {
     sub (/\/ref=stream.*/,"")
 }
+
 /^https:/ {
     link = $0
     if ((getline title) > 0) {


Include polling assignment.

Include polling assignment.

--- scripts/tdb/statuses_clockss.awk
+++ scripts/tdb/statuses_clockss.awk
@@ -1,5 +1,5 @@
 #!/usr/bin/awk -f
-# tdbout -t publisher,plugin,publisher:info[contract],year,publisher:info[tester],status,publisher:info[back] *.tdb
+# tdbout -t publisher,plugin,publisher:info[contract],year,publisher:info[tester],status,publisher:info[back],publisher:info[poller] *.tdb

 BEGIN {
   FS="\t"
@@ -48,7 +48,8 @@
         k[pn] = $7
       }
       d[pn] = $4
-      r[pn] = $5
+      r1[pn] = $5
+      r2[pn] = $8
       pn++
     }
     b[$1,lp2,$4]++
@@ -96,7 +97,7 @@
   scn = 16

   #print out header
-  printf "Publisher\tPlugin\tContr\tBack\tYear\tT\tTotal"
+  printf "Publisher\tPlugin\tContr\tBack\tYear\tT\tP\tTotal"
   for (j = 0 ; j < scn ; j++) {
     if (x[s[j]] > 0) {
     printf "\t%s", sc[j]
@@ -104,9 +105,9 @@
   }
   printf "\n"

-  #print out publisher, plugin, contract year, back, year, tester, total aus
+  #print out publisher, plugin, contract year, back, year, tester, poller, total aus
   for (i = 0 ; i < pn ; i++) {
-    printf "%s\t%s\t%s\t%s\t%s\t%s\t%d", p[i], n[i], t[i], k[i], d[i], r[i], b[p[i],n[i],d[i]]
+    printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%d", p[i], n[i], t[i], k[i], d[i], r1[i], r2[i], b[p[i],n[i],d[i]]
     for (j = 0 ; j < sn ; j++) {
       if (x[s[j]] > 0){
       if (c[p[i],n[i],d[i],s[j]] == 0) {
@@ -119,7 +120,7 @@
     printf "\n"
   }
     #print out bottom line sums
-    printf "Publisher\tPlugin\tContr\tBack\tYear\tT\t%d", tt
+    printf "Publisher\tPlugin\tContr\tBack\tYear\tT\tP\t%d", tt
     for (j = 0 ; j < sn ; j++) {
       if (x[s[j]] > 0) {
         printf "\t%d", x[s[j]]


added missed 'the'

added missed 'the'

git-svn-id: 392d0e5ce652024192c571322d40dcc23d6d83b0@156 8a65f31f-a56f-4bd6-98e8-2755f64920ec

--- scripts/callflow.awk
+++ scripts/callflow.awk
@@ -117,7 +117,7 @@

   if ($0 ~ "^#") {

-    # The "!" is link identifier
+    # The "!" is the link identifier
     LINK = index($0, "!")
     if (LINK == 0) {
       # There is no link, everything behind the first "#" is the comment