home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / stubfe / stubloc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.8 KB  |  109 lines

  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. /* 
  20.    stubloc.c --- stub fe handling of locale specific stuff.
  21. */
  22.  
  23. #include "xplocale.h"
  24.  
  25. #include "structs.h"
  26. #include "ntypes.h"
  27. #include "xpassert.h"
  28. #include "proto.h"
  29. #include "fe_proto.h"
  30.  
  31. #include "libi18n.h"
  32.  
  33. #include "csid.h"
  34.  
  35. /*
  36. ** FE_StrfTime - format a struct tm to a character string, depending
  37. ** on the value of the format parameter.
  38. **
  39. ** Values for format (and their mapping to unix strftime format
  40. ** strings) include:
  41. **
  42. ** XP_TIME_FORMAT - "%H:%M"
  43. ** XP_WEEKDAY_TIME_FORMAT - "%a %H:%M"
  44. ** XP_DATE_TIME_FORMAT - "%x %H:%M"
  45. ** XP_LONG_DATE_TIME_FORMAT - "%c"
  46. ** anything else - "%c"
  47. */
  48. size_t
  49. FE_StrfTime(MWContext *context,
  50.         char *result,
  51.         size_t maxsize,
  52.         int format,
  53.         const struct tm *timeptr)
  54. {
  55. }
  56.  
  57. /*
  58. ** FE_StrColl - call into the platform specific strcoll function.
  59. **
  60. ** Make sure strcoll() or equivalent works properly.  For example,
  61. ** the XFE has a check to make sure it does work, and if it doesn't
  62. ** it defaults to strcasecmp.
  63. */
  64. int
  65. FE_StrColl(const char *s1, const char *s2)
  66. {
  67. }
  68.  
  69. /* 
  70. ** INTL_ResourceCharSet - return the ascii name for the locale's
  71. ** character set id.
  72. **
  73. ** Use INTL_CharSetIDToName to retrieve the name given a CSID.
  74. **
  75. ** Note: This is a silly function, IMO.  It should just return the
  76. ** CSID, and the libi18n stuff could convert it to a name if it wants
  77. ** to.
  78. */
  79. char *
  80. INTL_ResourceCharSet()
  81. {
  82. }
  83.  
  84. /*
  85. ** INTL_DefaultDocCharSetID - return the default character set id for
  86. ** a given context.
  87. **
  88. ** It should first try to extract the csid from the document being shown in
  89. ** the context. using LO_GetDocumentCharacterSetInfo and INTL_GetCSIDocCSID.
  90. **
  91. ** If this fails, and the user has specified an encoding (using the View|Encoding
  92. ** menu, is should return the CSID for that.
  93. **
  94. ** Otherwise, it should return the FE's default preference for CSID.
  95. */
  96. int16
  97. INTL_DefaultDocCharSetID(MWContext *cxt)
  98. {
  99. }
  100.  
  101. /*
  102. ** INTL_Relayout - relayout a given context, as the character encoding
  103. ** has changed.
  104. */
  105. void
  106. INTL_Relayout(MWContext *pContext)
  107. {
  108. }
  109.