Knowledge

Talk:Getopt

Source 📝

567: 277: 250: 345: 503: 482: 219: 190: 408: 398: 377: 757:
are providing the official documentation? You probably are again attempting to make a joke, because the statement is absurd. As I suggested previously, you could possibly improve your comment before (by providing a verifiable source), but it would be pointless, since the point you were attempting to
871:
is a possible malware host. Given that the Knowledge article says Microsoft discontinued/archived the site in 2017, I suggest that link be removed or replaced. I found several alternatives with a web search, including at least one from Nuget, but since I have not personally tried any of these (yet),
645:
Thu Apr 27 13:52:32 1995 bostic * getopt.c 8.3 POSIX.2 has changed getopt to return -1 instead of EOF (to decouple getopt() from standard i/o). This change is more pedantic than functional as EOF is defined to be -1. Also, POSIX.2 says that getopt lives in
597:
How did this article come to be flagged as having a header section which does not adequately summarise the contents? Did somebody add it or is it based on some ratio of header size to article size? Anyway I have been thinking about how it might be improved but have not come up with anything as the
819:
As interesting as the debate about the Solaris documentation is, given this function has been standardised by POSIX it seems right that the article should concentrate on the POSIX standard version. Though there would be no harm in noting implementation difference this should be after having
733:
Regarding methods to avoid include files, this is indeed a goal for POSIX and the typical error indication on UNIX is return -1. Only stdio is an exception and getopt() is not related to stdio. Also note that SUSv2 (from 1997) mentions -1 as return code for getopt() errors.
803:
You again verified that you still have to learn how Knowledge works... I of course provided a verifiable source as I identified the document that you need to read. It is your duty to get hold of that document since verifiable sources do not need to exist in the internet.
690:
in POSIX is the appropriate place to start from, rather than a couple of unverifiable statements. Even if you find a verifiable source (for Solaris 9), the existing one for Solaris 9 says that Sun had not modified this detail as of 6 years after Bostic's comment.
836:
In order to give different Vendors equal chances, we need to either remove the GNU getopt related example in the article, or add an example that helps to understand the OpenSolaris enhancements for long options.
621:-1 is the return value document by POSIX; EOF was historically documented by many platforms, e.g. 4.3BSD, Solaris 2.9. Since EOF is guaranteed to be -ve the portable approach is to write 'getopt(...) : --> 153: 851:
With reference to the above it seems to me to be a backward step to remove the GNU example. If you or someone familiar with Solaris were to add a Solaris example then surely just go ahead and add it.
557: 867:
Footnote #11 contains a link to a web site the footnote says has a .NET implementation of Getopt. Clicking on that link in Chrome (latest version as of 2019-12-13) brings up a Chrome warning that
773:
As mentioned many times in the past: You need to learn how to interpret sources... and as mentioned already, the documentation you pointed to is outdated and I don't care to discuss why....
922: 598:
purpose of getopt is fundamentally simple even if the details of its use are slightly less simple. Does anyone else have any ideas here or could we just remove that flag?
706: 728:
The so called quoted Solaris 9 documentation from above is outdated. The official man page for Solaris 9 says: "Last change: 13 Sep 2002" and does not mention EOF.
147: 907: 335: 325: 79: 957: 547: 917: 359: 942: 464: 454: 200: 967: 879: 85: 301: 947: 902: 523: 912: 952: 707:
https://www.freebsd.org/cgi/man.cgi?query=getopt&apropos=0&sektion=3&manpath=SunOS+5.9&arch=default&format=html
430: 937: 932: 284: 255: 99: 30: 927: 354: 260: 104: 44: 20: 510: 487: 74: 566: 230: 682:) from Keith Bostic is irrelevant, because the date puts it in 4.4BSD (Ewx did say 4.3). Along those lines, a link to 421: 382: 65: 687: 168: 135: 672: 667: 196: 883: 575: 515: 788:
Since you do not provide a verifiable source, there is no date to discuss, even if you had a point to make.
109: 297: 522:
topics on Knowledge. If you would like to participate, please visit the project page, where you can join
856: 825: 603: 236: 129: 616:
https://en.wikipedia.org/search/?title=Getopt&curid=24881187&diff=664142126&oldid=664136673
875: 218: 189: 962: 161: 125: 55: 429:
on Knowledge. If you would like to participate, please visit the project page, where you can join
300:
on Knowledge. If you would like to participate, please visit the project page, where you can join
838: 805: 793: 774: 763: 735: 696: 650: 70: 714: 623: 175: 51: 852: 842: 821: 809: 778: 739: 712:
Rationale: "The getopt() function shall return -1, rather than EOF, so that <stdio.h: -->
654: 646:
unistd.h , not stdlib.h. From: "J.T. Conklin" <jtc@sun-lamp.cs.berkeley.edu: -->
599: 896: 789: 759: 718: 692: 627: 141: 413: 713:
is not required." - that's a pretty silly reason for changing the interface, IMO.
683: 344: 276: 249: 403: 639:... Otherwise, getopt() returns -1 when all command line options are parsed. 636:
You are mistaken, here is the relevant part of the man page from Solaris 9:
293: 868: 289: 502: 481: 863:
Footnoted link to a .NET Framework implementation may be a malware site
663:
Ewx's comment matches Oracle's documentation, which can be found here:
24: 519: 426: 407: 649:
You see, even on BSD, EOF is history since more than 20 years.
397: 376: 212: 184: 15: 887: 846: 813: 797: 782: 767: 743: 722: 700: 658: 631: 565: 343: 615: 160: 514:, a collaborative effort to improve the coverage of 425:, a collaborative effort to improve the coverage of 288:, a collaborative effort to improve the coverage of 749:I see. Oracle's webpages are not official (Oracle 642:Here is a relevant BSD related SCCS delta comment: 33:for general discussion of the article's subject. 758:make cannot be made with the existing sources. 872:I did not proactively update the link today. 832:Equal chances for Vendor specific enhancements 174: 8: 923:C-Class software articles of Mid-importance 873: 476: 371: 244: 199:on 30 October 2009 (UTC). The result of 574:This article falls within the scope of 478: 373: 246: 216: 7: 508:This article is within the scope of 419:This article is within the scope of 282:This article is within the scope of 235:It is of interest to the following 23:for discussing improvements to the 820:described the standard behaviour. 14: 908:Low-importance Computing articles 918:Mid-importance software articles 501: 480: 406: 396: 375: 275: 248: 217: 188: 45:Click here to start a new topic. 686:agrees with Ewx. Finally, the 552:This article has been rated as 459:This article has been rated as 330:This article has been rated as 310:Knowledge:WikiProject Computing 195:This article was nominated for 958:High-importance C/C++ articles 313:Template:WikiProject Computing 1: 943:Mid-importance Linux articles 888:17:20, 13 December 2019 (UTC) 709:was my source for Solaris 9. 526:and see a list of open tasks. 433:and see a list of open tasks. 352:This article is supported by 304:and see a list of open tasks. 42:Put new text under old text. 847:13:29, 6 February 2017 (UTC) 532:Knowledge:WikiProject C/C++ 439:Knowledge:WikiProject Linux 50:New to Knowledge? Welcome! 984: 968:WikiProject C/C++ articles 948:WikiProject Linux articles 903:C-Class Computing articles 535:Template:WikiProject C/C++ 465:project's importance scale 442:Template:WikiProject Linux 336:project's importance scale 913:C-Class software articles 573: 551: 496: 458: 391: 351: 329: 270: 243: 80:Be welcoming to newcomers 814:09:35, 2 June 2015 (UTC) 798:00:12, 2 June 2015 (UTC) 783:10:03, 1 June 2015 (UTC) 768:23:23, 28 May 2015 (UTC) 744:11:28, 28 May 2015 (UTC) 723:08:23, 28 May 2015 (UTC) 701:21:15, 27 May 2015 (UTC) 678:The quote (still need a 659:10:23, 27 May 2015 (UTC) 632:07:55, 27 May 2015 (UTC) 953:C-Class C/C++ articles 938:C-Class Linux articles 933:All Computing articles 570: 348: 298:information technology 225:This article is rated 75:avoid personal attacks 928:All Software articles 569: 347: 285:WikiProject Computing 100:Neutral point of view 355:WikiProject Software 105:No original research 571: 349: 316:Computing articles 231:content assessment 86:dispute resolution 47: 890: 878:comment added by 680:verifiable source 590: 589: 586: 585: 582: 581: 511:WikiProject C/C++ 475: 474: 471: 470: 422:WikiProject Linux 370: 369: 366: 365: 211: 210: 183: 182: 66:Assume good faith 43: 975: 684:Ultrix's manpage 558:importance scale 540: 539: 536: 533: 530: 505: 498: 497: 492: 484: 477: 447: 446: 443: 440: 437: 416: 411: 410: 400: 393: 392: 387: 379: 372: 318: 317: 314: 311: 308: 279: 272: 271: 266: 263: 252: 245: 228: 222: 221: 213: 192: 185: 179: 178: 164: 95:Article policies 16: 983: 982: 978: 977: 976: 974: 973: 972: 893: 892: 880:107.218.184.189 865: 834: 647: 640: 612: 595: 554:High-importance 537: 534: 531: 528: 527: 491:High‑importance 490: 444: 441: 438: 435: 434: 412: 405: 385: 315: 312: 309: 306: 305: 264: 258: 229:on Knowledge's 226: 121: 116: 115: 114: 91: 61: 12: 11: 5: 981: 979: 971: 970: 965: 960: 955: 950: 945: 940: 935: 930: 925: 920: 915: 910: 905: 895: 894: 864: 861: 833: 830: 817: 816: 786: 785: 756: 753:Solaris), but 752: 747: 746: 730: 729: 681: 676: 675: 670: 644: 638: 611: 608: 594: 593:Header Section 591: 588: 587: 584: 583: 580: 579: 572: 562: 561: 550: 544: 543: 541: 538:C/C++ articles 524:the discussion 506: 494: 493: 485: 473: 472: 469: 468: 461:Mid-importance 457: 451: 450: 448: 445:Linux articles 431:the discussion 418: 417: 401: 389: 388: 386:Mid‑importance 380: 368: 367: 364: 363: 360:Mid-importance 350: 340: 339: 332:Low-importance 328: 322: 321: 319: 302:the discussion 280: 268: 267: 265:Low‑importance 253: 241: 240: 234: 223: 209: 208: 201:the discussion 193: 181: 180: 118: 117: 113: 112: 107: 102: 93: 92: 90: 89: 82: 77: 68: 62: 60: 59: 48: 39: 38: 35: 34: 28: 13: 10: 9: 6: 4: 3: 2: 980: 969: 966: 964: 961: 959: 956: 954: 951: 949: 946: 944: 941: 939: 936: 934: 931: 929: 926: 924: 921: 919: 916: 914: 911: 909: 906: 904: 901: 900: 898: 891: 889: 885: 881: 877: 870: 862: 860: 858: 854: 849: 848: 844: 840: 831: 829: 827: 823: 815: 811: 807: 802: 801: 800: 799: 795: 791: 784: 780: 776: 772: 771: 770: 769: 765: 761: 754: 750: 745: 741: 737: 732: 731: 727: 726: 725: 724: 720: 716: 710: 708: 703: 702: 698: 694: 689: 685: 679: 674: 671: 669: 666: 665: 664: 661: 660: 656: 652: 643: 637: 634: 633: 629: 625: 619: 617: 609: 607: 605: 601: 592: 577: 568: 564: 563: 559: 555: 549: 546: 545: 542: 525: 521: 517: 513: 512: 507: 504: 500: 499: 495: 489: 486: 483: 479: 466: 462: 456: 453: 452: 449: 432: 428: 424: 423: 415: 409: 404: 402: 399: 395: 394: 390: 384: 381: 378: 374: 361: 358:(assessed as 357: 356: 346: 342: 341: 337: 333: 327: 324: 323: 320: 303: 299: 295: 291: 287: 286: 281: 278: 274: 273: 269: 262: 257: 254: 251: 247: 242: 238: 232: 224: 220: 215: 214: 206: 202: 198: 194: 191: 187: 186: 177: 173: 170: 167: 163: 159: 155: 152: 149: 146: 143: 140: 137: 134: 131: 127: 124: 123:Find sources: 120: 119: 111: 110:Verifiability 108: 106: 103: 101: 98: 97: 96: 87: 83: 81: 78: 76: 72: 69: 67: 64: 63: 57: 53: 52:Learn to edit 49: 46: 41: 40: 37: 36: 32: 26: 22: 18: 17: 874:— Preceding 866: 850: 835: 818: 787: 748: 711: 704: 677: 662: 648: 641: 635: 620: 613: 610:Return Value 596: 553: 509: 460: 420: 414:Linux portal 353: 331: 283: 237:WikiProjects 204: 171: 165: 157: 150: 144: 138: 132: 122: 94: 19:This is the 853:Steve James 822:Steve James 600:Steve James 148:free images 31:not a forum 963:C articles 897:Categories 688:rationale 673:Solaris 9 668:Solaris 8 307:Computing 294:computing 290:computers 256:Computing 205:Withdrawn 88:if needed 71:Be polite 21:talk page 876:unsigned 869:Codeplex 790:TEDickey 760:TEDickey 693:TEDickey 261:Software 197:deletion 56:get help 29:This is 27:article. 622:= 0'. 556:on the 463:on the 334:on the 227:C-class 154:WP refs 142:scholar 839:Schily 806:Schily 775:Schily 736:Schily 651:Schily 296:, and 233:scale. 126:Google 25:Getopt 705:FWIW 529:C/C++ 488:C/C++ 436:Linux 427:Linux 383:Linux 169:JSTOR 130:books 84:Seek 884:talk 857:talk 843:talk 826:talk 810:talk 794:talk 779:talk 764:talk 751:owns 740:talk 719:talk 697:talk 655:talk 628:talk 604:talk 548:High 518:and 203:was 162:FENS 136:news 73:and 755:you 715:Ewx 624:Ewx 614:Re 520:C++ 455:Mid 326:Low 176:TWL 899:: 886:) 859:) 845:) 828:) 812:) 796:) 781:) 766:) 742:) 721:) 699:) 657:) 630:) 618:: 606:) 362:). 292:, 259:: 156:) 54:; 882:( 855:( 841:( 824:( 808:( 792:( 777:( 762:( 738:( 717:( 695:( 653:( 626:( 602:( 578:. 576:C 560:. 516:C 467:. 338:. 239:: 207:. 172:· 166:· 158:· 151:· 145:· 139:· 133:· 128:( 58:.

Index

talk page
Getopt
not a forum
Click here to start a new topic.
Learn to edit
get help
Assume good faith
Be polite
avoid personal attacks
Be welcoming to newcomers
dispute resolution
Neutral point of view
No original research
Verifiability
Google
books
news
scholar
free images
WP refs
FENS
JSTOR
TWL
Articles for deletion
deletion
the discussion

content assessment
WikiProjects
WikiProject icon

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.