From: Galen T. <gta...@ya...> - 2021-06-07 15:16:08
|
A little more flexible, perhaps, than using an environment variable, would be to use a gawk command line option to indicate how your extension should handle errors. If you're not yet familiar with how to do so, see the documentation for getopt() at Getopt Function (The GNU Awk User’s Guide). | | | | Getopt Function (The GNU Awk User’s Guide) Getopt Function (The GNU Awk User’s Guide) | | | But I don't know if you can do this easily from an extension. Galen On Monday, June 7, 2021, 9:34:38 AM EDT, Vinícius dos Santos Oliveira <vin...@gm...> wrote: Em seg., 7 de jun. de 2021 às 10:23, Andrew J. Schorr <as...@te...> escreveu: You are certainly free to use global variables to configure the behavior of your library. Many extensions do this; for example, the XML extension uses the XMLMODE variable. But if you expect gawk to implement this policy for you, then I don't know how that would work. It would be the extension's responsibility to implement this type of behavior. How could gawk enforce it for you? To do that, we'd have to change the API, which seems unlikely. Okay. Thanks. I was just uneasy given I don't have much actual experience with AWK, so I wanted to check whether a current or similar idiom/convention for this was already in place as to not create new friction between extensions. I'll introduce a new var on my plugin and roll with it. -- Vinícius dos Santos Oliveirahttps://vinipsmaker.github.io/ _______________________________________________ Gawkextlib-users mailing list Gaw...@li... https://lists.sourceforge.net/lists/listinfo/gawkextlib-users |