Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

l_cmd.h File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <time.h>
#include <stdarg.h>

Include dependency graph for l_cmd.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  cblock_t

Defines

#define myoffsetof(type, identifier)   ((size_t)&((type *)0)->identifier)

Typedefs

typedef unsigned char byte

Enumerations

enum  qboolean { false, true }

Functions

float BigFloat (float l)
int BigLong (int l)
short BigShort (short l)
unsigned BigUnsigned (unsigned l)
unsigned short BigUnsignedShort (unsigned short l)
int CheckParm (char *check)
char * COM_Parse (char *data)
char * copystring (char *s)
void CRC_Init (unsigned short *crcvalue)
void CRC_ProcessByte (unsigned short *crcvalue, byte data)
unsigned short CRC_Value (unsigned short crcvalue)
void CreatePath (char *path)
void DefaultExtension (char *path, char *extension)
void DefaultPath (char *path, char *basepath)
void Error (char *error,...)
char * ExpandArg (char *path)
char * ExpandPath (char *path)
char * ExpandPathAndArchive (char *path)
void ExpandWildcards (int *argc, char ***argv)
void ExtractFileBase (char *path, char *dest)
void ExtractFileExtension (char *path, char *dest)
void ExtractFilePath (char *path, char *dest)
qboolean FileExists (char *filename)
int FileTime (char *path)
double I_FloatTime (void)
float LittleFloat (float l)
int LittleLong (int l)
short LittleShort (short l)
unsigned LittleUnsigned (unsigned l)
unsigned short LittleUnsignedShort (unsigned short l)
int LoadFile (char *filename, void **bufferptr, int offset, int length)
int ParseNum (char *str)
int Q_filelength (FILE *f)
void Q_getwd (char *out)
void Q_mkdir (char *path)
int Q_strcasecmp (char *s1, char *s2)
int Q_strncasecmp (char *s1, char *s2, int n)
void QCopyFile (char *from, char *to)
void qprintf (char *format,...)
FILESafeOpenRead (char *filename)
FILESafeOpenWrite (char *filename)
void SafeRead (FILE *f, void *buffer, int count)
void SafeWrite (FILE *f, void *buffer, int count)
void SaveFile (char *filename, void *buffer, int count)
void SetQdirFromPath (char *path)
void StripExtension (char *path)
void StripFilename (char *path)
char * strlower (char *in)
char * strupr (char *in)
int TryLoadFile (char *filename, void **bufferptr)
void Warning (char *warning,...)

Variables

qboolean archive
char archivedir [1024]
qboolean com_eof
char com_token [1024]
char gamedir [1024]
int myargc
char ** myargv
char qdir [1024]
qboolean verbose


Define Documentation

#define myoffsetof type,
identifier   )     ((size_t)&((type *)0)->identifier)
 

Definition at line 55 of file l_cmd.h.


Typedef Documentation

typedef unsigned char byte
 

Definition at line 51 of file l_cmd.h.

Referenced by __BigFloat(), __BigLong(), __BigShort(), add_bit(), BigFloat(), BigLong(), BigShort(), BigUnsigned(), BigUnsignedShort(), blit2_32(), blit4_32(), blit8_32(), blitVQQuad32fs(), CalcPHS(), callAsmCall(), CG_ImpactMark(), CIN_DrawCinematic(), CL_CDKeyValidate(), CL_Netchan_Decode(), CL_Netchan_Encode(), CL_ReadDemoMessage(), CL_Record_f(), CL_ServersResponsePacket(), CL_WritePacket(), ClusterMerge(), CM_ClusterPVS(), CM_LoadMap(), CM_WriteAreaBits(), CMod_LoadVisibility(), ColorBytes3(), ColorBytes4(), ColorToBytes(), Com_EventLoop(), Com_InitHunkMemory(), Com_Meminfo_f(), CopyLump(), CountBits(), CRC_ProcessByte(), decodeCodeBook(), decodeMuLaw(), decodeWavelet(), DeformText(), encodeMuLaw(), encodeWavelet(), EndBSPFile(), fgetLittleLong(), fgetLittleShort(), FilterTrace(), FloatSwap(), FS_CopyFile(), FS_Read(), FS_ReadFile(), FS_Write(), G_FilterPacket(), G_Find(), G_ParseField(), get_bit(), getc(), getLittleLong(), getLittleShort(), GetWavinfo(), GLS_Winding(), GrowGroup_r(), HL_AllocMaxBSP(), HL_CompressVis(), HL_CopyLump(), HL_DecompressVis(), HL_TextureBrushes(), Huff_addRef(), Huff_Compress(), Huff_Decompress(), Huff_getBit(), Huff_offsetReceive(), Huff_offsetTransmit(), Huff_putBit(), Huff_Receive(), Huff_transmit(), Hunk_Alloc(), initRoQ(), InsertMD3Model(), jpegDest(), LBMRLEDecompress(), LeafVectorFromPortalVector(), LerpMeshVertexes(), Load256Image(), Load32BitImage(), LoadAlphaMap(), LoadBMP(), LoadImage(), LoadImageFile(), LoadJPG(), LoadJPGBuff(), LoadLBM(), LoadPCX(), LoadPCX32(), LoadShaderImage(), LoadTGA(), LoadTGABuffer(), LongSwap(), main(), move4_32(), move8_32(), MSG_Copy(), MSG_Init(), MSG_initHuffman(), MSG_InitOOB(), MSG_ReadData(), MSG_ReadDeltaEntity(), MSG_ReadDeltaPlayerstate(), MSG_ReadFloat(), MSG_WriteBigString(), MSG_WriteData(), MSG_WriteDeltaEntity(), MSG_WriteDeltaPlayerstate(), MSG_WriteString(), MuLawDecode(), MuLawEncode(), NET_OutOfBandData(), Netchan_Transmit(), Netchan_TransmitNextFragment(), NormalToLatLong(), ParseFace(), PatchMapDrawSurfs(), PrintOccluded(), ProjectDlightTexture(), Q1_AllocMaxBSP(), Q1_CopyLump(), Q1_TextureBrushes(), Q2_AllocMaxBSP(), Q2_CompressVis(), Q2_CopyLump(), Q2_DecompressVis(), Q3_CopyLump(), R_AddAnimSurfaces(), R_AddMD3Surfaces(), R_BlendOverTexture(), R_ClusterPVS(), R_ColorShiftLightingBytes(), R_ComputeFogNum(), R_CreateBuiltinImages(), R_CreateDefaultImage(), R_CreateDlightImage(), R_CreateFogImage(), R_CreateImage(), R_CullModel(), R_FindImageFile(), R_GammaCorrect(), R_GetTag(), R_Init(), R_inPVS(), R_LevelShot(), R_LightScaleTexture(), R_LoadImage(), R_LoadLightmaps(), R_LoadMD3(), R_LoadMD4(), R_LoadVisibility(), R_MarkFragments(), R_MarkLeaves(), R_MipMap(), R_MipMap2(), R_ModelBounds(), R_SetupEntityLighting(), R_SetupEntityLightingGrid(), RB_AddQuadStamp(), RB_AddQuadStampExt(), RB_CalcWaveColor(), RB_SurfaceAnim(), RB_SurfaceFlare(), RB_SurfaceMesh(), RB_SurfaceTriangles(), RB_TakeScreenshot(), RB_TakeScreenshotJPEG(), RE_LoadWorldMap(), RE_SetWorldVisData(), RE_StretchRaw(), RE_UploadCinematic(), readQuadInfo(), recurseQuad(), RecursiveLeafBitFlow(), ResampleSfx(), ResampleSfxRaw(), ResampleTexture(), RoQInterrupt(), S_AdpcmEncodeSound(), S_AdpcmGetSamples(), S_ByteSwapRawSamples(), S_LoadSound(), S_PaintChannelFromMuLaw(), S_RawSamples(), S_UpdateBackgroundTrack(), Save256Image(), send(), SetFacetFilter(), SetTerrainTextures(), setupQuad(), ShortSwap(), Sin_AllocMaxBSP(), Sin_CompressVis(), Sin_CopyLump(), Sin_DecompressVis(), SNDDMA_Init(), StringToFilter(), SV_AddEntitiesVisibleFromPoint(), SV_GameClientNum(), SV_GentityNum(), SV_inPVS(), SV_inPVSIgnorePortals(), SV_Netchan_Decode(), SV_Netchan_Encode(), SV_NumForGentity(), SV_SendClientGameState(), SV_SendClientSnapshot(), SV_SendServerCommand(), Swap_Init(), Texture_CreateSolid(), Texture_ForName(), Texture_ForNamePath(), Texture_Init(), Texture_InitPalette(), Texture_LoadSkin(), Texture_LoadTexture(), Texture_LoadTGATexture(), Texture_MakeDefault(), Texture_MakeNoshadertexture(), TraceLine(), TraceLtm(), UpdateIPBans(), Upload32(), VL_FixLightmapEdges(), VL_GetFilter(), VL_LightSurfaceWithVolume(), VL_StoreLightmap(), VM_CallCompiled(), VM_CallInterpreted(), VM_Compile(), VM_Create(), VM_PrepareInterpreter(), VM_Restart(), VS_FixLightmapEdges(), VS_GetFilter(), VS_LightSurfaceWithVolume(), VS_StoreLightmap(), WriteLBMfile(), WritePCXfile(), WriteTGA(), Z_CheckHeap(), Z_ClearZone(), Z_Free(), and Z_TagMalloc().


Enumeration Type Documentation

enum qboolean
 

Enumeration values:
false 
true 

Definition at line 50 of file l_cmd.h.

00050 {false, true} qboolean;


Function Documentation

float BigFloat float  l  ) 
 

Definition at line 1052 of file l_cmd.c.

01053 {
01054     union {byte b[4]; float f;} in, out;
01055     
01056     in.f = l;
01057     out.b[0] = in.b[3];
01058     out.b[1] = in.b[2];
01059     out.b[2] = in.b[1];
01060     out.b[3] = in.b[0];
01061     
01062     return out.f;
01063 }

int BigLong int  l  ) 
 

Definition at line 1035 of file l_cmd.c.

01036 {
01037     byte    b1,b2,b3,b4;
01038 
01039     b1 = l&255;
01040     b2 = (l>>8)&255;
01041     b3 = (l>>16)&255;
01042     b4 = (l>>24)&255;
01043 
01044     return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
01045 }

short BigShort short  l  ) 
 

Definition at line 1019 of file l_cmd.c.

01020 {
01021     byte    b1,b2;
01022 
01023     b1 = l&255;
01024     b2 = (l>>8)&255;
01025 
01026     return (b1<<8) + b2;
01027 }

unsigned BigUnsigned unsigned  l  ) 
 

Definition at line 1087 of file l_cmd.c.

References byte, and l.

01088 {
01089     byte    b1,b2,b3,b4;
01090 
01091     b1 = l&255;
01092     b2 = (l>>8)&255;
01093     b3 = (l>>16)&255;
01094     b4 = (l>>24)&255;
01095 
01096     return ((unsigned)b1<<24) + ((unsigned)b2<<16) + ((unsigned)b3<<8) + b4;
01097 }

unsigned short BigUnsignedShort unsigned short  l  ) 
 

Definition at line 1071 of file l_cmd.c.

References byte, and l.

01072 {
01073     byte    b1,b2;
01074 
01075     b1 = l&255;
01076     b2 = (l>>8)&255;
01077 
01078     return (b1<<8) + b2;
01079 }

int CheckParm char *  check  ) 
 

Definition at line 595 of file l_cmd.c.

00596 {
00597     int             i;
00598 
00599     for (i = 1;i<myargc;i++)
00600     {
00601         if ( !Q_strcasecmp(check, myargv[i]) )
00602             return i;
00603     }
00604 
00605     return 0;
00606 }

char* COM_Parse char *  data  ) 
 

Definition at line 438 of file l_cmd.c.

00439 {
00440     int     c;
00441     int     len;
00442     
00443     len = 0;
00444     com_token[0] = 0;
00445     
00446     if (!data)
00447         return NULL;
00448         
00449 // skip whitespace
00450 skipwhite:
00451     while ( (c = *data) <= ' ')
00452     {
00453         if (c == 0)
00454         {
00455             com_eof = true;
00456             return NULL;            // end of file;
00457         }
00458         data++;
00459     }
00460     
00461 // skip // comments
00462     if (c=='/' && data[1] == '/')
00463     {
00464         while (*data && *data != '\n')
00465             data++;
00466         goto skipwhite;
00467     }
00468     
00469 
00470 // handle quoted strings specially
00471     if (c == '\"')
00472     {
00473         data++;
00474         do
00475         {
00476             c = *data++;
00477             if (c=='\"')
00478             {
00479                 com_token[len] = 0;
00480                 return data;
00481             }
00482             com_token[len] = c;
00483             len++;
00484         } while (1);
00485     }
00486 
00487 // parse single characters
00488     if (c=='{' || c=='}'|| c==')'|| c=='(' || c=='\'' || c==':')
00489     {
00490         com_token[len] = c;
00491         len++;
00492         com_token[len] = 0;
00493         return data+1;
00494     }
00495 
00496 // parse a regular word
00497     do
00498     {
00499         com_token[len] = c;
00500         data++;
00501         len++;
00502         c = *data;
00503     if (c=='{' || c=='}'|| c==')'|| c=='(' || c=='\'' || c==':')
00504             break;
00505     } while (c>32);
00506     
00507     com_token[len] = 0;
00508     return data;
00509 }

char* copystring char *  s  ) 
 

Definition at line 347 of file l_cmd.c.

00348 {
00349     char    *b;
00350     b = GetMemory(strlen(s)+1);
00351     strcpy (b, s);
00352     return b;
00353 }

void CRC_Init unsigned short *  crcvalue  ) 
 

Definition at line 92 of file l_crc.c.

00093 {
00094     *crcvalue = CRC_INIT_VALUE;
00095 } //end of the function CRC_Init

void CRC_ProcessByte unsigned short *  crcvalue,
byte  data
 

Definition at line 102 of file l_crc.c.

00103 {
00104     *crcvalue = (*crcvalue << 8) ^ crctable[(*crcvalue >> 8) ^ data];
00105 } //end of the function CRC_ProcessByte

unsigned short CRC_Value unsigned short  crcvalue  ) 
 

Definition at line 112 of file l_crc.c.

00113 {
00114     return crcvalue ^ CRC_XOR_VALUE;
00115 } //end of the function CRC_Value

void CreatePath char *  path  ) 
 

Definition at line 1178 of file l_cmd.c.

References c, and Q_mkdir().

01179 {
01180     char    *ofs, c;
01181 
01182     if (path[1] == ':')
01183         path += 2;
01184 
01185     for (ofs = path+1 ; *ofs ; ofs++)
01186     {
01187         c = *ofs;
01188         if (c == '/' || c == '\\')
01189         {   // create the directory
01190             *ofs = 0;
01191             Q_mkdir (path);
01192             *ofs = c;
01193         }
01194     }
01195 }

Here is the call graph for this function:

void DefaultExtension char *  path,
char *  extension
 

Definition at line 752 of file l_cmd.c.

00753 {
00754     char    *src;
00755 //
00756 // if path doesnt have a .EXT, append extension
00757 // (extension should include the .)
00758 //
00759     src = path + strlen(path) - 1;
00760 
00761     while (*src != PATHSEPERATOR && src != path)
00762     {
00763         if (*src == '.')
00764             return;                 // it has an extension
00765         src--;
00766     }
00767 
00768     strcat (path, extension);
00769 }

void DefaultPath char *  path,
char *  basepath
 

Definition at line 772 of file l_cmd.c.

00773 {
00774     char    temp[128];
00775 
00776     if (path[0] == PATHSEPERATOR)
00777         return;                   // absolute path location
00778     strcpy (temp,path);
00779     strcpy (path,basepath);
00780     strcat (path,temp);
00781 }

void Error char *  error,
  ...
 

Definition at line 178 of file l_cmd.c.

00179 {
00180     va_list argptr;
00181     char    text[1024];
00182 
00183     va_start(argptr, error);
00184     vsprintf(text, error, argptr);
00185     va_end(argptr);
00186     printf("ERROR: %s\n", text);
00187 
00188     Log_Write(text);
00189     Log_Close();
00190 
00191     exit (1);
00192 } //end of the function Error

char* ExpandArg char *  path  ) 
 

Definition at line 306 of file l_cmd.c.

References Q_getwd(), strcat(), and strcpy().

00307 {
00308     static char full[1024];
00309 
00310     if (path[0] != '/' && path[0] != '\\' && path[1] != ':')
00311     {
00312         Q_getwd (full);
00313         strcat (full, path);
00314     }
00315     else
00316         strcpy (full, path);
00317     return full;
00318 }

Here is the call graph for this function:

char* ExpandPath char *  path  ) 
 

Definition at line 320 of file l_cmd.c.

References Error(), qdir, and sprintf().

00321 {
00322     static char full[1024];
00323     if (!qdir)
00324         Error ("ExpandPath called without qdir set");
00325     if (path[0] == '/' || path[0] == '\\' || path[1] == ':')
00326         return path;
00327     sprintf (full, "%s%s", qdir, path);
00328     return full;
00329 }

Here is the call graph for this function:

char* ExpandPathAndArchive char *  path  ) 
 

Definition at line 331 of file l_cmd.c.

References archivedir, ExpandPath(), QCopyFile(), and sprintf().

00332 {
00333     char    *expanded;
00334     char    archivename[1024];
00335 
00336     expanded = ExpandPath (path);
00337 
00338     if (archive)
00339     {
00340         sprintf (archivename, "%s/%s", archivedir, path);
00341         QCopyFile (expanded, archivename);
00342     }
00343     return expanded;
00344 }

Here is the call graph for this function:

void ExpandWildcards int *  argc,
char ***  argv
 

Definition at line 110 of file l_cmd.c.

00111 {
00112 }

void ExtractFileBase char *  path,
char *  dest
 

Definition at line 833 of file l_cmd.c.

References src, and strlen().

00834 {
00835     char    *src;
00836 
00837     src = path + strlen(path) - 1;
00838 
00839 //
00840 // back up until a \ or the start
00841 //
00842     while (src != path && *(src-1) != '\\' && *(src-1) != '/')
00843         src--;
00844 
00845     while (*src && *src != '.')
00846     {
00847         *dest++ = *src++;
00848     }
00849     *dest = 0;
00850 }

Here is the call graph for this function:

void ExtractFileExtension char *  path,
char *  dest
 

Definition at line 852 of file l_cmd.c.

References src, strcpy(), and strlen().

00853 {
00854     char    *src;
00855 
00856     src = path + strlen(path) - 1;
00857 
00858 //
00859 // back up until a . or the start
00860 //
00861     while (src != path && *(src-1) != '.')
00862         src--;
00863     if (src == path)
00864     {
00865         *dest = 0;  // no extension
00866         return;
00867     }
00868 
00869     strcpy (dest,src);
00870 }

Here is the call graph for this function:

void ExtractFilePath char *  path,
char *  dest
 

Definition at line 817 of file l_cmd.c.

References memcpy(), src, and strlen().

00818 {
00819     char    *src;
00820 
00821     src = path + strlen(path) - 1;
00822 
00823 //
00824 // back up until a \ or the start
00825 //
00826     while (src != path && *(src-1) != '\\' && *(src-1) != '/')
00827         src--;
00828 
00829     memcpy (dest, path, src-path);
00830     dest[src-path] = 0;
00831 }

Here is the call graph for this function:

qboolean FileExists char *  filename  ) 
 

Definition at line 673 of file l_cmd.c.

References f, fclose(), fopen(), and qboolean.

00674 {
00675     FILE    *f;
00676 
00677     f = fopen (filename, "r");
00678     if (!f)
00679         return false;
00680     fclose (f);
00681     return true;
00682 }

Here is the call graph for this function:

int FileTime char *  path  ) 
 

Definition at line 419 of file l_cmd.c.

00420 {
00421     struct  stat    buf;
00422     
00423     if (stat (path,&buf) == -1)
00424         return -1;
00425     
00426     return buf.st_mtime;
00427 }

double I_FloatTime void   ) 
 

Definition at line 362 of file l_cmd.c.

00363 {
00364     time_t  t;
00365     
00366     time (&t);
00367     
00368     return t;
00369 #if 0
00370 // more precise, less portable
00371     struct timeval tp;
00372     struct timezone tzp;
00373     static int      secbase;
00374 
00375     gettimeofday(&tp, &tzp);
00376     
00377     if (!secbase)
00378     {
00379         secbase = tp.tv_sec;
00380         return tp.tv_usec/1000000.0;
00381     }
00382     
00383     return (tp.tv_sec - secbase) + tp.tv_usec/1000000.0;
00384 #endif
00385 }

float LittleFloat float  l  ) 
 

Definition at line 1065 of file l_cmd.c.

01066 {
01067     return l;
01068 }

int LittleLong int  l  ) 
 

Definition at line 1047 of file l_cmd.c.

01048 {
01049     return l;
01050 }

short LittleShort short  l  ) 
 

Definition at line 1029 of file l_cmd.c.

01030 {
01031     return l;
01032 }

unsigned LittleUnsigned unsigned  l  ) 
 

Definition at line 1099 of file l_cmd.c.

Referenced by Sin_SwapBSPFile().

01100 {
01101     return l;
01102 }

unsigned short LittleUnsignedShort unsigned short  l  ) 
 

Definition at line 1081 of file l_cmd.c.

Referenced by Sin_SwapBSPFile().

01082 {
01083     return l;
01084 }

int LoadFile char *  filename,
void **  bufferptr,
int  offset,
int  length
 

Definition at line 689 of file l_cmd.c.

References buffer, f, fclose(), fseek(), GetMemory(), length(), offset, Q_filelength(), SafeOpenRead(), SafeRead(), and SEEK_SET.

00690 {
00691     FILE    *f;
00692     void    *buffer;
00693 
00694     f = SafeOpenRead(filename);
00695     fseek(f, offset, SEEK_SET);
00696     if (!length) length = Q_filelength(f);
00697     buffer = GetMemory(length+1);
00698     ((char *)buffer)[length] = 0;
00699     SafeRead(f, buffer, length);
00700     fclose(f);
00701 
00702     *bufferptr = buffer;
00703     return length;
00704 }

Here is the call graph for this function:

int ParseNum char *  str  ) 
 

Definition at line 904 of file l_cmd.c.

00905 {
00906     if (str[0] == '$')
00907         return ParseHex (str+1);
00908     if (str[0] == '0' && str[1] == 'x')
00909         return ParseHex (str+2);
00910     return atol (str);
00911 }

int Q_filelength FILE f  ) 
 

Definition at line 615 of file l_cmd.c.

00616 {
00617     int     pos;
00618     int     end;
00619 
00620     pos = ftell (f);
00621     fseek (f, 0, SEEK_END);
00622     end = ftell (f);
00623     fseek (f, pos, SEEK_SET);
00624 
00625     return end;
00626 }

void Q_getwd char *  out  ) 
 

Definition at line 387 of file l_cmd.c.

00388 {
00389 #if defined(WIN32) || defined(_WIN32)
00390    getcwd (out, 256);
00391    strcat (out, "\\");
00392 #else
00393    getwd(out);
00394    strcat(out, "/");
00395 #endif
00396 }

void Q_mkdir char *  path  ) 
 

Definition at line 399 of file l_cmd.c.

References errno, Error(), and strerror().

00400 {
00401 #ifdef WIN32
00402     if (_mkdir (path) != -1)
00403         return;
00404 #else
00405     if (mkdir (path, 0777) != -1)
00406         return;
00407 #endif
00408     if (errno != EEXIST)
00409         Error ("mkdir %s: %s",path, strerror(errno));
00410 }

Here is the call graph for this function:

int Q_strcasecmp char *  s1,
char *  s2
 

Definition at line 538 of file l_cmd.c.

References Q_strncasecmp().

Referenced by CheckParm(), and Q1_TextureContents().

00539 {
00540     return Q_strncasecmp (s1, s2, 99999);
00541 }

Here is the call graph for this function:

int Q_strncasecmp char *  s1,
char *  s2,
int  n
 

Definition at line 512 of file l_cmd.c.

References n.

00513 {
00514     int     c1, c2;
00515     
00516     do
00517     {
00518         c1 = *s1++;
00519         c2 = *s2++;
00520 
00521         if (!n--)
00522             return 0;       // strings are equal until end point
00523         
00524         if (c1 != c2)
00525         {
00526             if (c1 >= 'a' && c1 <= 'z')
00527                 c1 -= ('a' - 'A');
00528             if (c2 >= 'a' && c2 <= 'z')
00529                 c2 -= ('a' - 'A');
00530             if (c1 != c2)
00531                 return -1;      // strings not equal
00532         }
00533     } while (c1);
00534     
00535     return 0;       // strings are equal
00536 }

void QCopyFile char *  from,
char *  to
 

Definition at line 1205 of file l_cmd.c.

References buffer, CreatePath(), FreeMemory(), length(), LoadFile(), and SaveFile().

01206 {
01207     void    *buffer;
01208     int     length;
01209 
01210     length = LoadFile (from, &buffer, 0, 0);
01211     CreatePath (to);
01212     SaveFile (to, buffer, length);
01213     FreeMemory(buffer);
01214 }

Here is the call graph for this function:

void qprintf char *  format,
  ...
 

Definition at line 212 of file l_cmd.c.

References format, va_end, va_list, va_start, vprintf(), and vsprintf().