Wednesday, July 18, 2007

File System Functions UnAugmentAsterisk

File System Functions 325

UnAugmentAsterisk
Makes the *.* pattern return all files and subdirectory names for the long (OS/2) name space
Local Servers: nonblocking
Remote Servers: N/A
NetWare Server: 5.x, 6.x
Platform: NLM
Service: File System
Syntax
#include
void UnAugmentAsterisk (
int yesno);
Parameters
yesno
(IN) Specifies whether to return all files and subdirectory names for the long name space:
Remarks
The default behavior for opendir and readdir is to interpret a pattern of *.* to return only those file
and directory names that contain only one dot. Therefore, the pattern *.* guarantees that all files are
returned for the DOS name space only. Calling UnAugmentAsterisk allows you to use *.* to return
all file and directory names for the long name space as well.
NOTE: The name of the function refers to the fact that the high bit for the asterisk character in the
pattern is set by default. This function reverses this setting.
See Also
opendir (page 297), readdir (page 301)

This function is so great , it make me happy and help me fix a daemon bug.

Labels:


Friday, July 13, 2007

Transfer the bin to the hex code

void bin2hex( const void* in_buffer, int in_size, char * out_buffer )
{
size_t i, k;
const unsigned char* in_chars = (const unsigned char *) in_buffer;

for ( i = 0; i < in_size; ++ i )
{
#ifdef NETWARE
unsigned char chars[2];
chars[0] = ( in_chars[i] >> 4 ) & 0x0f;
chars[1] = in_chars[i] & 0x0f ;
#else
unsigned char chars[2] = { ( in_chars[i] >> 4 ) & 0x0f,
in_chars[i] & 0x0f };
#endif
for ( k = 0; k < 2; ++ k )
{
if ( chars[k] < 10 )
out_buffer[ i * 2 + k ] = (char) ('0' + chars[k] );
else
out_buffer[ i * 2 + k ] = (char) ( 'A' + chars[k] - 10 );
}
}

out_buffer[ i * 2 ] = '\0';
}

Labels:


Monday, July 09, 2007

SMS Preface[copy from sms_doc.pdf]

SMS Preface
Target Services is an interface that allows generic access to the Target Service data and controls
the Target Service Agent (TSA). The following chapters provide general information about what
the engine expects from the TSA and how the parameters interact with other parameters of TS
functions.
Utility Library contains the support routines used with the SME, SMSDI, and TSA modules that
work under the NetWare environment.
You should already be familiar with the System Independent Data Format (SIDF) as far as the data
set data and transfer buffer is concerned (see Standard ECMA-208 for more information).

The Target Service Agent (TSA) is a target-specific process that interacts with the Target Service’s
file system to read, write, and scan data. Each TSA reflects the features and limitations offered by
the Target Service. If the Target Service has a hierarchical file system, the Target Service offers
options that pertain to a hierarchical file system (for example, traversing the file system tree).
Targets services differ in the type of data sets they contain and the methods used to scan (search)
for them. For example, one target has a flat file system while another has a hierarchical file system.
When scanning for data sets on these targets, the option to exclude files under a directory does not
exist under a flat file system.
Each TSA provides different options such as traversing the file system, excluding all databases, or
backing up a file server. Since the engine should not know these differences, SMS provides a way
for each TSA to express the options and resources available to the user. Each TSA defines a list of
strings that describe its options and resources. The engine retrieves these strings, presents them to
the user for selection, and notifies the TSA of the user's selections through bit maps or values.

Labels:


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]

Scrape It
Free Hit Counters
Scrape It