Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

jzcrap.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

VOID JzDeleteVariableSegment (PCHAR VariableName, ULONG Selection)

Variables

PCHAR BootString []


Function Documentation

VOID JzDeleteVariableSegment PCHAR  VariableName,
ULONG  Selection
 

Definition at line 5 of file jzcrap.c.

References ArcGetEnvironmentVariable, ArcSetEnvironmentVariable, CHAR, Count, FALSE, Index, MAXIMUM_ENVIRONMENT_VALUE, NULL, and TRUE.

Referenced by DoPartitionDelete().

00009 { 00010 PCHAR Variable; 00011 CHAR VariableValue[MAXIMUM_ENVIRONMENT_VALUE]; 00012 ULONG Index; 00013 ULONG Count; 00014 BOOLEAN FirstSegment; 00015 00016 if ((Variable = ArcGetEnvironmentVariable(VariableName)) == NULL) { 00017 return; 00018 } 00019 00020 FirstSegment = TRUE; 00021 Index = 0; 00022 *VariableValue = 0; 00023 while (strchr(Variable,';') != NULL) { 00024 Count = strchr(Variable,';') - Variable; 00025 if (Index != Selection) { 00026 if (!FirstSegment) { 00027 strcat(VariableValue,";"); 00028 } 00029 strncat(VariableValue, Variable, Count); 00030 FirstSegment = FALSE; 00031 } 00032 Variable += Count + 1; 00033 Index++; 00034 } 00035 00036 if (Index != Selection) { 00037 if (!FirstSegment) { 00038 strcat(VariableValue,";"); 00039 } 00040 strcat(VariableValue,Variable); 00041 } 00042 00043 ArcSetEnvironmentVariable(VariableName, VariableValue); 00044 return; 00045 }


Variable Documentation

PCHAR BootString[]
 

Initial value:

{ "LOADIDENTIFIER", "SYSTEMPARTITION", "OSLOADER", "OSLOADPARTITION", "OSLOADFILENAME", "OSLOADOPTIONS" }

Definition at line 47 of file jzcrap.c.

Referenced by DoPartitionDelete().


Generated on Sat May 15 19:44:24 2004 for test by doxygen 1.3.7