Commit e03efcd9 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Get version number from messages file

Also, rationalise the two Omni_RegisterClient calls to both use _swix since they're virtually the same function repeated twice.

Version 2.47. Tagged as 'LanManFS-2_47'
parent 52ed32eb
......@@ -39,7 +39,10 @@ endif
include CModule
# Static dependencies
o.MyResObj od.MyResObj: LocalRes:ROM.Sprites ${MERGEDMSGS} ${DIRS}
${RESGEN} ${RES_AREA} $@ ${MERGEDMSGS} ${RES_PATH}.Messages LocalRes:ROM.Sprites ${RES_PATH}.Sprites
o.MyResObj od.MyResObj: LocalRes:ROM.Sprites ${MERGEDMSGS}PP ${DIRS}
${RESGEN} ${RES_AREA} $@ ${MERGEDMSGS}PP ${RES_PATH}.Messages LocalRes:ROM.Sprites ${RES_PATH}.Sprites
${MERGEDMSGS}PP: ${MERGEDMSGS}
${INSERTVERSION} ${MERGEDMSGS} > $@
# Dynamic dependencies:
No preview for this file type
DispName:LAN Manager
_Version:Filled by build system
WhoTCPIP:Lan Manager/TCPIP client
WhoBEUI:Lan Manager/NetBEUI client
WhoLogon:Lan Manager/Logon client
......
/* (2.46)
/* (2.47)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.46
#define Module_MajorVersion_CMHG 2.47
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Jul 2014
#define Module_Date_CMHG 06 Aug 2014
#define Module_MajorVersion "2.46"
#define Module_Version 246
#define Module_MajorVersion "2.47"
#define Module_Version 247
#define Module_MinorVersion ""
#define Module_Date "14 Jul 2014"
#define Module_Date "06 Aug 2014"
#define Module_ApplicationDate "14-Jul-14"
#define Module_ApplicationDate "06-Aug-14"
#define Module_ComponentName "LanManFS"
#define Module_ComponentPath "castle/RiscOS/Sources/Networking/Omni/Protocols/LanManFS"
#define Module_FullVersion "2.46"
#define Module_HelpVersion "2.46 (14 Jul 2014)"
#define Module_LibraryVersionInfo "2:46"
#define Module_FullVersion "2.47"
#define Module_HelpVersion "2.47 (06 Aug 2014)"
#define Module_LibraryVersionInfo "2:47"
......@@ -254,21 +254,24 @@ err_t Lgn_Logoff ( void )
void Lgn_Register(void)
{
char titlebar[24];
char infobox[3*32];
char titlebar[24]; /* Title bar - 24 max */
char infobox[3*32]; /* Info box - 3x32 max */
strncpy( titlebar, MsgLookup("DispName"), sizeof(titlebar) );
strcpy( titlebar, MsgLookup("_Version") ); /* Temp copy */
sprintf( infobox, "%s\n"
"\xA9 Acorn Computers Ltd, 1997\n"
Module_FullVersion " (" Module_ApplicationDate ")",
MsgLookup("WhoLogon") );
"%s",
MsgLookup("WhoLogon"),
titlebar );
strncpy( titlebar, MsgLookup("DispName"), sizeof(titlebar) );
_swix( SWI_Omni_RegisterClient, _INR(0,6),
LanMan_LogonOp, /* Client ID */
RC_LOGON_TYPE | RC_NEEDS_AUTHSERV | RC_NEEDS_USERID | RC_NEEDS_PASSWD,
"lmlgni", /* Sprite name - 12 max */
titlebar, /* Title bar - 24 max */
infobox, /* Info box - 3x32 max */
0, /* Site ID */
0, /* Site ID (ignored) */
FilingSystemName "+" ); /* Just needs to be unique from LanManFS name */
}
......
......@@ -1300,28 +1300,28 @@ void Omni_RecheckInfo( int flags )
/* Omni_Register() --------------------------------*/
static void Omni_Register(void)
{
_kernel_swi_regs R;
char titlebar[24]; /* Title bar - 24 max */
char infobox[3*32]; /* Info box - 3x32 max */
strncpy( titlebar, MsgLookup("DispName"), sizeof(titlebar) );
strcpy( titlebar, MsgLookup("_Version") ); /* Temp copy */
sprintf( infobox, "%s\n"
"\xA9 Acorn Computers Ltd, 1997\n"
Module_FullVersion " (" Module_ApplicationDate ")",
"%s",
( Stat_ClassMask & SCLASS_IP ) ? MsgLookup("WhoTCPIP")
: MsgLookup("WhoBEUI") );
: MsgLookup("WhoBEUI"),
titlebar );
strncpy( titlebar, MsgLookup("DispName"), sizeof(titlebar) );
R.r[0] = LanMan_OmniOp; /* Client ID */
R.r[1] = RC_NEEDS_USERID | RC_NEEDS_PASSWD | RC_NEEDS_MOUNTPATH |
RC_DOES_FILES | RC_EXTN_CHAR('.') |
RC_DOES_PRINT | RC_NEEDS_PRINTPWD;
R.r[2] = (int) "lmicon"; /* Sprite name - 12 max */
R.r[3] = (int) titlebar;
R.r[4] = (int) infobox;
R.r[5] = 0; /* Site ID word. Ignore this! */
R.r[6] = (int) FilingSystemName;
if ( _kernel_swi( SWI_Omni_RegisterClient, &R, &R ) == NULL )
if ( _swix( SWI_Omni_RegisterClient, _INR(0,6),
LanMan_OmniOp, /* Client ID */
RC_NEEDS_USERID | RC_NEEDS_PASSWD | RC_NEEDS_MOUNTPATH |
RC_DOES_FILES | RC_EXTN_CHAR('.') |
RC_DOES_PRINT | RC_NEEDS_PRINTPWD,
"lmicon", /* Sprite name - 12 max */
titlebar, /* Title bar - 24 max */
infobox, /* Info box - 3x32 max */
0, /* Site ID (ignored) */
FilingSystemName ) == NULL )
Omni_Registered = true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment