home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Online / StrICQ / Src / Stricq_Cat.c < prev    next >
C/C++ Source or Header  |  2000-08-20  |  19KB  |  559 lines

  1. /****************************************************************
  2.    This file was created automatically by `FlexCat 2.4'
  3.    from "stricq.cd".
  4.  
  5.    Do NOT edit by hand!
  6. ****************************************************************/
  7.  
  8. /****************************************************************
  9.     This file uses the auto initialization possibilities of
  10.     Dice, gcc and SAS/C, respectively.
  11.  
  12.     Dice does this by using the keywords __autoinit and
  13.     __autoexit, SAS uses names beginning with _STI or
  14.     _STD, respectively. gcc uses the asm() instruction,
  15.     to emulate C++ constructors and destructors.
  16.  
  17.     Using this file you don't have *all* possibilities of
  18.     the locale.library. (No Locale or Language arguments are
  19.     supported when opening the catalog. However, these are
  20.     *very* rarely used, so this should be sufficient for most
  21.     applications.
  22. ****************************************************************/
  23.  
  24.  
  25. /*
  26.     Include files and compiler specific stuff
  27. */
  28. #include <exec/memory.h>
  29. #include <libraries/locale.h>
  30. #include <libraries/iffparse.h>
  31.  
  32. #include <proto/exec.h>
  33. #include <proto/dos.h>
  34. #include <proto/locale.h>
  35. #include <proto/utility.h>
  36. #include <proto/iffparse.h>
  37.  
  38. #include <stdlib.h>
  39. #include <string.h>
  40.  
  41.  
  42.  
  43. #include "stricq_cat.h"
  44.  
  45.  
  46. /*
  47.     Variables
  48. */
  49. struct FC_String stricq_Strings[310] = {
  50.     { (STRPTR) "\033c\033bProgramming & Documentation\033p\n"\
  51.     "\033cDouglas F. McLaughlin \0333<stricq@owlnet.net>\0330\n\n"\
  52.     "\033c\033bLocale Support and other Changes\n"\
  53.     "\033cNogfx \0333<NicoEFE@ifrance.com>\0330\n"\
  54.     "\033cMichael Malyshev \0333<Michael_Malyshev@mail.ru>\0330\n\n"\
  55.     "\033c\033bCurrent Language\n"\
  56.     "\033cBuilt-in English", 0 },
  57.     { (STRPTR) "STRICQ - An Amiga, MUI Based ICQ Clone.\n"\
  58.     "Copyright (C) 1998-2000 Douglas F. McLaughlin\n\n"\
  59.     "This Program is free software; you can redistribute it "\
  60.     "and/or modify it under the terms of the GNU General "\
  61.     "Public License as published by the Free Software Foundation; "\
  62.     "either version 2 of the License, or (at your option) any later version.\n\n"\
  63.     "This program is distributed in the hope that it will be usefull, "\
  64.     "but WITHOUT ANY WARRANTY; without even the implied warranty of"\
  65.     "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "\
  66.     "GNU General Public License for more details.\n\n"\
  67.     "You should have received a copy of the GNU General Public License "\
  68.     "along with this program; if not, write to the Free Software Foundation, "\
  69.     "Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"\
  70.     "\nDouglas F. McLaughlin\n"\
  71.     "; Menu 1: titre !", 1 },
  72.     { (STRPTR) "\000Project", 2 },
  73.     { (STRPTR) "S\000Search UIN", 3 },
  74.     { (STRPTR) "R\000Reset Sockets", 4 },
  75.     { (STRPTR) "A\000About...", 5 },
  76.     { (STRPTR) "\000About MUI...", 6 },
  77.     { (STRPTR) "Q\000Quit", 7 },
  78.     { (STRPTR) "\000Settings", 8 },
  79.     { (STRPTR) "I\000ICQ Prefs...", 9 },
  80.     { (STRPTR) "\000Save Prefs", 10 },
  81.     { (STRPTR) "M\000MUI...", 11 },
  82.     { (STRPTR) "\000Messages", 12 },
  83.     { (STRPTR) "\000Save...", 13 },
  84.     { (STRPTR) "\000Windows", 14 },
  85.     { (STRPTR) "1\000Activity Log", 15 },
  86.     { (STRPTR) "2\000Active Sockets", 16 },
  87.     { (STRPTR) "3\000Errors", 17 },
  88.     { (STRPTR) "4\000Message History", 18 },
  89.     { (STRPTR) "5\000STRICQ Log", 19 },
  90.     { (STRPTR) "6\000Incoming Messages", 20 },
  91.     { (STRPTR) "7\000Pager Messages", 21 },
  92.     { (STRPTR) "8\000System Message", 22 },
  93.     { (STRPTR) "9\000User Information", 23 },
  94.     { (STRPTR) "Online", 24 },
  95.     { (STRPTR) "Invisible", 25 },
  96.     { (STRPTR) "Not Available", 26 },
  97.     { (STRPTR) "Free For Chat", 27 },
  98.     { (STRPTR) "Occupied", 28 },
  99.     { (STRPTR) "Away", 29 },
  100.     { (STRPTR) "Do Not Disturb", 30 },
  101.     { (STRPTR) "OFFLINE", 31 },
  102.     { (STRPTR) "Basic Info", 32 },
  103.     { (STRPTR) "Extended Info", 33 },
  104.     { (STRPTR) "Options", 34 },
  105.     { (STRPTR) "List", 35 },
  106.     { (STRPTR) "Auto Reply", 36 },
  107.     { (STRPTR) "Set Away", 37 },
  108.     { (STRPTR) "Status Color", 38 },
  109.     { (STRPTR) "Chat Mode Color", 39 },
  110.     { (STRPTR) "Main", 40 },
  111.     { (STRPTR) "Home", 41 },
  112.     { (STRPTR) "Work", 42 },
  113.     { (STRPTR) "More", 43 },
  114.     { (STRPTR) "Info/About", 44 },
  115.     { (STRPTR) "Affiliations", 45 },
  116.     { (STRPTR) "Interests", 46 },
  117.     { (STRPTR) "Picture", 47 },
  118.     { (STRPTR) "Security", 48 },
  119.     { (STRPTR) "Ignore", 49 },
  120.     { (STRPTR) "Servers", 50 },
  121.     { (STRPTR) "Notify", 51 },
  122.     { (STRPTR) "Color", 52 },
  123.     { (STRPTR) "Away", 53 },
  124.     { (STRPTR) "Options", 54 },
  125.     { (STRPTR) "Unspecified", 55 },
  126.     { (STRPTR) "Female", 56 },
  127.     { (STRPTR) "Male", 57 },
  128.     { (STRPTR) "N/A", 58 },
  129.     { (STRPTR) "January", 59 },
  130.     { (STRPTR) "February", 60 },
  131.     { (STRPTR) "March", 61 },
  132.     { (STRPTR) "April", 62 },
  133.     { (STRPTR) "May", 63 },
  134.     { (STRPTR) "June", 64 },
  135.     { (STRPTR) "July", 65 },
  136.     { (STRPTR) "August", 66 },
  137.     { (STRPTR) "September", 67 },
  138.     { (STRPTR) "October", 68 },
  139.     { (STRPTR) "November", 69 },
  140.     { (STRPTR) "December", 70 },
  141.     { (STRPTR) "Auto send to users on my list", 71 },
  142.     { (STRPTR) "Auto send to all users", 72 },
  143.     { (STRPTR) "Show request", 73 },
  144.     { (STRPTR) "All users may add me to their contact list", 74 },
  145.     { (STRPTR) "My authoriation is required", 75 },
  146.     { (STRPTR) "Double-Click here to open\nthe User Window.", 76 },
  147.     { (STRPTR) "Add", 77 },
  148.     { (STRPTR) "Remove", 78 },
  149.     { (STRPTR) "About STRICQ", 79 },
  150.     { (STRPTR) "Load Progress", 80 },
  151.     { (STRPTR) "Initializing", 81 },
  152.     { (STRPTR) "STRICQ Log", 82 },
  153.     { (STRPTR) "From Client To Server:", 83 },
  154.     { (STRPTR) "From Server To Client:", 84 },
  155.     { (STRPTR) "Incoming Messages", 85 },
  156.     { (STRPTR) "Reply", 86 },
  157.     { (STRPTR) "Get Info", 87 },
  158.     { (STRPTR) "Remove Message", 88 },
  159.     { (STRPTR) "Clear Messages", 89 },
  160.     { (STRPTR) "Authorize", 90 },
  161.     { (STRPTR) "Send URL", 91 },
  162.     { (STRPTR) "Message", 92 },
  163.     { (STRPTR) "Send to", 93 },
  164.     { (STRPTR) "Send Message", 94 },
  165.     { (STRPTR) "Send This Message", 95 },
  166.     { (STRPTR) "User Information", 96 },
  167.     { (STRPTR) "Nick", 97 },
  168.     { (STRPTR) "First", 98 },
  169.     { (STRPTR) "Last", 99 },
  170.     { (STRPTR) "E-Mail", 100 },
  171.     { (STRPTR) "Auth. Required", 101 },
  172.     { (STRPTR) "City", 102 },
  173.     { (STRPTR) "Country Code", 103 },
  174.     { (STRPTR) "Time Zone", 104 },
  175.     { (STRPTR) "State", 105 },
  176.     { (STRPTR) "Age", 106 },
  177.     { (STRPTR) "Sex", 107 },
  178.     { (STRPTR) "Phone", 108 },
  179.     { (STRPTR) "Home Page", 109 },
  180.     { (STRPTR) "About", 110 },
  181.     { (STRPTR) "Add To Contact List", 111 },
  182.     { (STRPTR) "Search For User", 112 },
  183.     { (STRPTR) "Search UIN", 113 },
  184.     { (STRPTR) "Search E-Mail", 114 },
  185.     { (STRPTR) "Search Name", 115 },
  186.     { (STRPTR) "Search Results", 116 },
  187.     { (STRPTR) "Search Hits:", 117 },
  188.     { (STRPTR) "Add / Update Contact List", 118 },
  189.     { (STRPTR) "Get Userinfo", 119 },
  190.     { (STRPTR) "Send a URL", 120 },
  191.     { (STRPTR) "Description", 121 },
  192.     { (STRPTR) "URL", 122 },
  193.     { (STRPTR) "System Message", 123 },
  194.     { (STRPTR) "OK", 124 },
  195.     { (STRPTR) "Message History", 125 },
  196.     { (STRPTR) "Activity Log", 126 },
  197.     { (STRPTR) "Active Sockets", 127 },
  198.     { (STRPTR) "Chat Request", 128 },
  199.     { (STRPTR) "Chat", 129 },
  200.     { (STRPTR) "Join", 130 },
  201.     { (STRPTR) "Cancel", 131 },
  202.     { (STRPTR) "FileDirect Request", 132 },
  203.     { (STRPTR) "File List", 133 },
  204.     { (STRPTR) "Add File(s)", 134 },
  205.     { (STRPTR) "Remove File", 135 },
  206.     { (STRPTR) "Enter File Description", 136 },
  207.     { (STRPTR) "Send", 137 },
  208.     { (STRPTR) "Add UIN Request", 138 },
  209.     { (STRPTR) "Get Userinfo", 139 },
  210.     { (STRPTR) "Close", 140 },
  211.     { (STRPTR) "Pager Messages", 141 },
  212.     { (STRPTR) "Name", 142 },
  213.     { (STRPTR) "Errors, Information & Debug", 143 },
  214.     { (STRPTR) "Debug Levels", 144 },
  215.     { (STRPTR) "Show UDP Packets", 145 },
  216.     { (STRPTR) "Show UDP Debug", 146 },
  217.     { (STRPTR) "Show TCP Packets", 147 },
  218.     { (STRPTR) "Show TCP Debug", 148 },
  219.     { (STRPTR) "Clear Errors", 149 },
  220.     { (STRPTR) "Save To File", 150 },
  221.     { (STRPTR) "Ignored UIN", 151 },
  222.     { (STRPTR) "-1 = Never Expire", 152 },
  223.     { (STRPTR) "ICQ Number", 153 },
  224.     { (STRPTR) "ICQ#", 154 },
  225.     { (STRPTR) "Current / Last IP", 155 },
  226.     { (STRPTR) "Nickname", 156 },
  227.     { (STRPTR) "EMail Addresses", 157 },
  228.     { (STRPTR) "Primary EMail", 158 },
  229.     { (STRPTR) "Don't Publish my Primary EMail address", 159 },
  230.     { (STRPTR) "Secondary Email", 160 },
  231.     { (STRPTR) "Old Mail", 161 },
  232.     { (STRPTR) "Home Address", 162 },
  233.     { (STRPTR) "Street", 163 },
  234.     { (STRPTR) "Address", 164 },
  235.     { (STRPTR) "Zip Code", 165 },
  236.     { (STRPTR) "Display Map", 166 },
  237.     { (STRPTR) "Country", 167 },
  238.     { (STRPTR) "Phone Directory Listings", 168 },
  239.     { (STRPTR) "FAX", 169 },
  240.     { (STRPTR) "Cellular", 170 },
  241.     { (STRPTR) "Local Time", 171 },
  242.     { (STRPTR) "Time Zone", 172 },
  243.     { (STRPTR) "Company", 173 },
  244.     { (STRPTR) "Position", 174 },
  245.     { (STRPTR) "Occupation", 175 },
  246.     { (STRPTR) "Work Address", 176 },
  247.     { (STRPTR) "Additionnal Details", 177 },
  248.     { (STRPTR) "Gender", 178 },
  249.     { (STRPTR) "Home Page Category", 179 },
  250.     { (STRPTR) "Birth Date & Horoscope", 180 },
  251.     { (STRPTR) "Month", 181 },
  252.     { (STRPTR) "Day", 182 },
  253.     { (STRPTR) "Year", 183 },
  254.     { (STRPTR) "Zodiac", 184 },
  255.     { (STRPTR) "Notify everyone on my birthday", 185 },
  256.     { (STRPTR) "View Horoscope", 186 },
  257.     { (STRPTR) "Spoken Languages", 187 },
  258.     { (STRPTR) "Write a bit about your personality, favorites, \nfamily, friends... so that other ICQ members\nwith similar interests can locate you", 188 },
  259.     { (STRPTR) "Select up to three categories and enter\nkeywords to describe specific interests", 189 },
  260.     { (STRPTR) "Organization, Affiliation, Group", 190 },
  261.     { (STRPTR) "Enter Name(s) or Keywords", 191 },
  262.     { (STRPTR) "Past Background", 192 },
  263.     { (STRPTR) "Click the Edit button to select a category of\n interest and available interest topics", 193 },
  264.     { (STRPTR) "Personnal Interests", 194 },
  265.     { (STRPTR) "Select Categories", 195 },
  266.     { (STRPTR) "Edit", 196 },
  267.     { (STRPTR) "Select Picture File", 197 },
  268.     { (STRPTR) "Last Update Date", 198 },
  269.     { (STRPTR) "None available", 199 },
  270.     { (STRPTR) "Picture File", 200 },
  271.     { (STRPTR) "Clear", 201 },
  272.     { (STRPTR) "File Size", 202 },
  273.     { (STRPTR) "Picture Privacy Settings (//)", 203 },
  274.     { (STRPTR) "Do not have a picture (Auto Decline)", 204 },
  275.     { (STRPTR) "Thumbnail Preview", 205 },
  276.     { (STRPTR) "Preview not yet available", 206 },
  277.     { (STRPTR) "Change Contact List Authorization", 207 },
  278.     { (STRPTR) "IP Publishing", 208 },
  279.     { (STRPTR) "Do not publish my IP address", 209 },
  280.     { (STRPTR) "WebAware", 210 },
  281.     { (STRPTR) "Allow others to view my online\npresence on the World Wide Web", 211 },
  282.     { (STRPTR) "Change Password", 212 },
  283.     { (STRPTR) "Password", 213 },
  284.     { (STRPTR) "Verify Password", 214 },
  285.     { (STRPTR) "Save Password", 215 },
  286.     { (STRPTR) "Delete", 216 },
  287.     { (STRPTR) "Port", 217 },
  288.     { (STRPTR) "Server", 218 },
  289.     { (STRPTR) "On Startup", 219 },
  290.     { (STRPTR) "On Shutdown", 220 },
  291.     { (STRPTR) "Message Notify", 221 },
  292.     { (STRPTR) "Message PreParse", 222 },
  293.     { (STRPTR) "Message PostParse", 223 },
  294.     { (STRPTR) "Online Notify", 224 },
  295.     { (STRPTR) "Offline Notify", 225 },
  296.     { (STRPTR) "Chat Notify", 226 },
  297.     { (STRPTR) "Chat Beep", 227 },
  298.     { (STRPTR) "FileDirect", 228 },
  299.     { (STRPTR) "Download Dir", 229 },
  300.     { (STRPTR) "Online", 230 },
  301.     { (STRPTR) "Online Color", 231 },
  302.     { (STRPTR) "Offline", 232 },
  303.     { (STRPTR) "Offline Color", 233 },
  304.     { (STRPTR) "Invisible", 234 },
  305.     { (STRPTR) "Invisible Color", 235 },
  306.     { (STRPTR) "Not Available", 236 },
  307.     { (STRPTR) "Not Available Color", 237 },
  308.     { (STRPTR) "Free For Chat", 238 },
  309.     { (STRPTR) "Free For Chat Color", 239 },
  310.     { (STRPTR) "Occupied", 240 },
  311.     { (STRPTR) "Occupied Color", 241 },
  312.     { (STRPTR) "Away", 242 },
  313.     { (STRPTR) "Away Color", 243 },
  314.     { (STRPTR) "Do Not Disturb", 244 },
  315.     { (STRPTR) "Do Not Disturb Color", 245 },
  316.     { (STRPTR) "New User", 246 },
  317.     { (STRPTR) "New User Color", 247 },
  318.     { (STRPTR) "Do Not Disturb", 248 },
  319.     { (STRPTR) "Set Your status to change after specified\nnumber of seconds. Use 0 to disable.\nTimes are acumulative. Resolution of 5 seconds.", 249 },
  320.     { (STRPTR) "Change status to:", 250 },
  321.     { (STRPTR) "After this many seconds:", 251 },
  322.     { (STRPTR) "Global Options", 252 },
  323.     { (STRPTR) "Open Log Window", 253 },
  324.     { (STRPTR) "Auto Reconnect", 254 },
  325.     { (STRPTR) "Open Message Win", 255 },
  326.     { (STRPTR) "Show Message Time", 256 },
  327.     { (STRPTR) "Activity Name Sort", 257 },
  328.     { (STRPTR) "Multi-line Message Input", 258 },
  329.     { (STRPTR) "Use Internet Time", 259 },
  330.     { (STRPTR) "Selections", 260 },
  331.     { (STRPTR) "Notify Lamp", 261 },
  332.     { (STRPTR) "UDP Protocol", 262 },
  333.     { (STRPTR) "Messages Options", 263 },
  334.     { (STRPTR) "Window Pop-Up", 264 },
  335.     { (STRPTR) "Screen To Front", 265 },
  336.     { (STRPTR) "No Message Log", 266 },
  337.     { (STRPTR) "Storage", 267 },
  338.     { (STRPTR) "Active", 268 },
  339.     { (STRPTR) "Retrieve From Server", 269 },
  340.     { (STRPTR) "Save To Server", 270 },
  341.     { (STRPTR) "Could not create Keep-Alive Timer object.", 271 },
  342.     { (STRPTR) "Could not create Command-Resend Timer object.", 272 },
  343.     { (STRPTR) "Could not create Command-Parser Timer object.", 273 },
  344.     { (STRPTR) "An Amiga ICQ Client", 274 },
  345.     { (STRPTR) "Start Search", 275 },
  346.     { (STRPTR) "Send This URL", 276 },
  347.     { (STRPTR) "ICQ preferences", 277 },
  348.     { (STRPTR) "Div/Dept", 278 },
  349.     { (STRPTR) "Dialogue", 279 },
  350.     { (STRPTR) "Send", 280 },
  351.     { (STRPTR) "User Info", 281 },
  352.     { (STRPTR) "History", 282 },
  353.     { (STRPTR) "Basic Info", 283 },
  354.     { (STRPTR) "Extended Info", 284 },
  355.     { (STRPTR) "Prefs", 285 },
  356.     { (STRPTR) "Main", 286 },
  357.     { (STRPTR) "Home", 287 },
  358.     { (STRPTR) "More", 288 },
  359.     { (STRPTR) "Info/About", 289 },
  360.     { (STRPTR) "Prefs", 290 },
  361.     { (STRPTR) "Black", 291 },
  362.     { (STRPTR) "Maroon", 292 },
  363.     { (STRPTR) "Green", 293 },
  364.     { (STRPTR) "Olive", 294 },
  365.     { (STRPTR) "Navy", 295 },
  366.     { (STRPTR) "Purple", 296 },
  367.     { (STRPTR) "Teal", 297 },
  368.     { (STRPTR) "Gray", 298 },
  369.     { (STRPTR) "Silver", 299 },
  370.     { (STRPTR) "Red", 300 },
  371.     { (STRPTR) "Lime", 301 },
  372.     { (STRPTR) "Yellow", 302 },
  373.     { (STRPTR) "Blue", 303 },
  374.     { (STRPTR) "Fuchsia", 304 },
  375.     { (STRPTR) "Aqua", 305 },
  376.     { (STRPTR) "White", 306 },
  377.     { (STRPTR) "Version", 307 },
  378.     { (STRPTR) "Authors", 308 },
  379.     { (STRPTR) "License", 309 }
  380. };
  381.  
  382. STATIC struct Catalog *stricqCatalog = NULL;
  383. #ifdef LOCALIZE_V20
  384. STATIC STRPTR stricqStrings = NULL;
  385. STATIC ULONG stricqStringsSize;
  386. #endif
  387.  
  388.  
  389. #if defined(_DCC)
  390. STATIC __autoexit VOID _STDClosestricqCatalog(VOID)
  391. #elif defined(__SASC)
  392. VOID _STDClosestricqCatalog(VOID)
  393. #elif defined(__GNUC__)
  394. STATIC VOID _STDClosestricqCatalog(VOID)
  395. #else
  396. VOID ClosestricqCatalog(VOID)
  397. #endif
  398.  
  399. {
  400.     if (stricqCatalog) {
  401.     CloseCatalog(stricqCatalog);
  402.     }
  403. #ifdef LOCALIZE_V20
  404.     if (stricqStrings) {
  405.     FreeMem(stricqStrings, stricqStringsSize);
  406.     }
  407. #endif
  408. }
  409.  
  410.  
  411. #if defined(_DCC)
  412. STATIC __autoinit VOID _STIOpenstricqCatalog(VOID)
  413. #elif defined(__SASC)
  414. VOID _STIOpenstricqCatalog(VOID)
  415. #elif defined(__GNUC__)
  416. VOID _STIOpenstricqCatalog(VOID)
  417. #else
  418. VOID OpenstricqCatalog(VOID)
  419. #endif
  420.  
  421. {
  422.     if (LocaleBase) {
  423.     if ((stricqCatalog = OpenCatalog(NULL, (STRPTR) "stricq.catalog",
  424.                      OC_BuiltInLanguage, "english",
  425.                      OC_Version, 0,
  426.                      TAG_DONE))) {
  427.         struct FC_String *fc;
  428.         int i;
  429.  
  430.         for (i = 0, fc = stricq_Strings;  i < 310;  i++, fc++) {
  431.          fc->msg = GetCatalogStr(stricqCatalog, fc->id, (STRPTR) fc->msg);
  432.         }
  433.     }
  434.     }
  435. }
  436.  
  437. #if defined(__GNUC__)
  438. __asm ("  .text;  .stabs \"___CTOR_LIST__\",22,0,0,__STIOpenstricqCatalog");
  439. __asm ("  .text;  .stabs \"___DTOR_LIST__\",22,0,0,__STDClosestricqCatalog");
  440. #endif
  441.  
  442.  
  443.  
  444. #ifdef LOCALIZE_V20
  445. VOID InitstricqCatalog(STRPTR language)
  446.  
  447. {
  448.     struct IFFHandle *iffHandle;
  449.  
  450.     /*
  451.     **  Use iffparse.library only, if we need to.
  452.     */
  453.     if (LocaleBase  ||  !IFFParseBase  ||  !language  ||
  454.     Stricmp(language, "english") == 0) {
  455.     return;
  456.     }
  457.  
  458.     if ((iffHandle = AllocIFF())) {
  459.     char path[128]; /* Enough to hold 4 path items (dos.library 3.1)    */
  460.     strcpy(path, "PROGDIR:Catalogs");
  461.     AddPart((STRPTR) path, language, sizeof(path));
  462.     AddPart((STRPTR) path, "stricq.catalog", sizeof(path));
  463.     if (!(iffHandle->iff_Stream = Open((STRPTR) path, MODE_OLDFILE))) {
  464.         strcpy(path, "LOCALE:Catalogs");
  465.         AddPart((STRPTR) path, language, sizeof(path));
  466.         AddPart((STRPTR) path, language, sizeof(path));
  467.         iffHandle->iff_Stream = Open((STRPTR) path, MODE_OLDFILE);
  468.     }
  469.  
  470.     if (iffHandle->iff_Stream) {
  471.         InitIFFasDOS(iffHandle);
  472.         if (!OpenIFF(iffHandle, IFFF_READ)) {
  473.         if (!PropChunk(iffHandle, MAKE_ID('C','T','L','G'),
  474.                    MAKE_ID('S','T','R','S'))) {
  475.             struct StoredProperty *sp;
  476.             int error;
  477.  
  478.             for (;;) {
  479.             if ((error = ParseIFF(iffHandle, IFFPARSE_STEP))
  480.                    ==  IFFERR_EOC) {
  481.                 continue;
  482.             }
  483.             if (error) {
  484.                 break;
  485.             }
  486.  
  487.             if ((sp = FindProp(iffHandle, MAKE_ID('C','T','L','G'),
  488.                        MAKE_ID('S','T','R','S')))) {
  489.                 /*
  490.                 **  Check catalog and calculate the needed
  491.                 **  number of bytes.
  492.                 **  A catalog string consists of
  493.                 **      ID (LONG)
  494.                 **      Size (LONG)
  495.                 **      Bytes (long word padded)
  496.                 */
  497.                 LONG bytesRemaining;
  498.                 LONG *ptr;
  499.  
  500.                 stricqStringsSize = 0;
  501.                 bytesRemaining = sp->sp_Size;
  502.                 ptr = (LONG *) sp->sp_Data;
  503.  
  504.                 while (bytesRemaining > 0) {
  505.                 LONG skipSize, stringSize;
  506.  
  507.                 ptr++;                  /*  Skip ID     */
  508.                 stringSize = *ptr++;
  509.                 skipSize = ((stringSize+3) >> 2);
  510.  
  511.                 stricqStringsSize += stringSize+1;  /*  NUL */
  512.                 bytesRemaining -= 8 + (skipSize << 2);
  513.                 ptr += skipSize;
  514.                 }
  515.  
  516.                 if (!bytesRemaining  &&
  517.                 (stricqStrings = AllocMem(stricqStringsSize, MEMF_ANY))) {
  518.                 STRPTR sptr;
  519.  
  520.                 bytesRemaining = sp->sp_Size;
  521.                 ptr = (LONG *) sp->sp_Data;
  522.                 sptr = stricqStrings;
  523.  
  524.                 while (bytesRemaining) {
  525.                     LONG skipSize, stringSize, id;
  526.                     struct FC_String *fc;
  527.                     int i;
  528.  
  529.                     id = *ptr++;
  530.                     stringSize = *ptr++;
  531.                     skipSize = ((stringSize+3) >> 2);
  532.  
  533.                     CopyMem(ptr, sptr, stringSize);
  534.                     bytesRemaining -= 8 + (skipSize << 2);
  535.                     ptr += skipSize;
  536.  
  537.                     for (i = 0, fc = stricq_Strings;  i < 310;  i++, fc++) {
  538.                     if (fc->id == id) {
  539.                         fc->msg = sptr;
  540.                     }
  541.                     }
  542.  
  543.                     sptr += stringSize;
  544.                     *sptr++ = '\0';
  545.                 }
  546.                 }
  547.                 break;
  548.             }
  549.             }
  550.         }
  551.         CloseIFF(iffHandle);
  552.         }
  553.         Close(iffHandle->iff_Stream);
  554.     }
  555.     FreeIFF(iffHandle);
  556.     }
  557. }
  558. #endif
  559.