本文整理汇总了C++中PrintLine函数的典型用法代码示例。如果您正苦于以下问题:C++ PrintLine函数的具体用法?C++ PrintLine怎么用?C++ PrintLine使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PrintLine函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrintCSymbolHeader
static void PrintCSymbolHeader (void)
/* Output a header for a list of C symbols */
{
/* Header */
PrintLine (" id name type kind sc offs symbol scope");
PrintSeparator ();
}
示例2: IoCtrlApp
//Handler for 'ioctrl' command.
VOID IoCtrlApp(LPSTR pstr)
{
__KERNEL_THREAD_OBJECT* lpIoCtrlThread = NULL;
lpIoCtrlThread = KernelThreadManager.CreateKernelThread(
(__COMMON_OBJECT*)&KernelThreadManager,
0,
KERNEL_THREAD_STATUS_READY,
PRIORITY_LEVEL_NORMAL,
IoCtrlStart,
NULL,
NULL,
"IO CTRL");
if(NULL == lpIoCtrlThread) //Can not create the IO control thread.
{
PrintLine("Can not create IO control thread.");
return;
}
//Set the current focus thread to IO control application.
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager,
(__COMMON_OBJECT*)lpIoCtrlThread);
//Block the shell thread untile IoCtrlThread over.
lpIoCtrlThread->WaitForThisObject((__COMMON_OBJECT*)lpIoCtrlThread);
//Reset the current focus kernel thread to shell.
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager,
NULL);
//Destroy the application thread object.
KernelThreadManager.DestroyKernelThread((__COMMON_OBJECT*)&KernelThreadManager,
(__COMMON_OBJECT*)lpIoCtrlThread);
}
示例3: SysDiagApp
//
//System diag application's shell start code.
//
VOID SysDiagApp(LPSTR pstr)
{
__KERNEL_THREAD_OBJECT* lpSysDiagThread = NULL;
lpSysDiagThread = KernelThreadManager.CreateKernelThread(
(__COMMON_OBJECT*)&KernelThreadManager,
0,
KERNEL_THREAD_STATUS_READY,
PRIORITY_LEVEL_NORMAL,
SysDiagStart,
NULL,
NULL,
"SYS DIAG");
if(NULL == lpSysDiagThread) //Can not create the kernel thread.
{
PrintLine("Can not start system diag application,please retry again.");
return;
}
//Set current focus kernel thread to diagnostic thread.
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager,
(__COMMON_OBJECT*)lpSysDiagThread);
//Block current shell thread to wait the diagnostic application execute over.
lpSysDiagThread->WaitForThisObject((__COMMON_OBJECT*)lpSysDiagThread);
//Reset the current focus thread.
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager,
NULL);
//Destroy the diagnostic thread object.
KernelThreadManager.DestroyKernelThread((__COMMON_OBJECT*)&KernelThreadManager,
(__COMMON_OBJECT*)lpSysDiagThread);
}
示例4: CollectMeshes
void CollectMeshes(const aiScene* scene, OutModel& model, aiNode* node)
{
// skip LOD for now
String name = node->mName.C_Str();
if (name.Find("LOD1") != String::NPOS || name.Find("LOD2") != String::NPOS)
{
return;
}
for (unsigned i = 0; i < node->mNumMeshes; ++i)
{
aiMesh* mesh = scene->mMeshes[node->mMeshes[i]];
for (unsigned j = 0; j < model.meshes_.Size(); ++j)
{
if (mesh == model.meshes_[j])
{
PrintLine("Warning: same mesh found multiple times");
break;
}
}
model.meshIndices_.Insert(node->mMeshes[i]);
model.meshes_.Push(mesh);
model.meshNodes_.Push(node);
model.totalVertices_ += mesh->mNumVertices;
model.totalIndices_ += GetNumValidFaces(mesh) * 3;
}
for (unsigned i = 0; i < node->mNumChildren; ++i)
CollectMeshes(scene, model, node->mChildren[i]);
}
示例5: while
void gsFont::Print(int x, int Xend, int y, int z, unsigned long colour, gsFontAlign alignment, const char* string)
{
// Safety ... dont try to access a null object
if (m_pFontPipe == NULL)
return;
if (string == NULL)
return;
int curr_x;
char* temp_string = (char*)string;
int max_length = Xend-x;
m_Bold=0;
m_Underline=0;
m_pFontPipe->TextureSet(m_TBbase, m_TBwidth,
gsDriver::getTexSizeFromInt(m_TexWidth),
gsDriver::getTexSizeFromInt(m_TexHeight),
m_PSM, 0, 0, 0, 0);
while (temp_string[0] != '\0') // while there are more lines ...
{
int pix_length = 0; // length of current line in pixels
int char_length = 0; // length of current line in characters
// Calculate width of current line
GetCurrLineLength(temp_string, max_length, pix_length, char_length);
// set start Xpos - based on alignment
switch (alignment)
{
case GSFONT_ALIGN_RIGHT:
curr_x = Xend-pix_length;
break;
case GSFONT_ALIGN_CENTRE:
curr_x = x+((max_length-pix_length)/2);
break;
case GSFONT_ALIGN_LEFT:
default:
curr_x = x;
break;
}
PrintLine(curr_x, y, z, colour, char_length, temp_string);
// finished printing the current line, so move onto the next line
y+=m_CharGridHeight;
// move the string pointer onto the next line
temp_string += char_length;
}
}
示例6: JvmHandler
static DWORD JvmHandler(__CMD_PARA_OBJ* pCmdParaObj)
{
__KERNEL_THREAD_OBJECT* lpJVMThread = NULL;
//char* className = "-version";
//Create Java VM thread.
lpJVMThread = KernelThreadManager.CreateKernelThread(
(__COMMON_OBJECT*)&KernelThreadManager,
0,
KERNEL_THREAD_STATUS_READY,
PRIORITY_LEVEL_NORMAL,
JvmEntryPoint,
pCmdParaObj,
NULL,
"JVM");
if (NULL == lpJVMThread) //Can not create the IO control thread.
{
PrintLine("Can not create Java VM thread.");
return SHELL_CMD_PARSER_SUCCESS;
}
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager,
(__COMMON_OBJECT*)lpJVMThread); //Set the current focus to IO control
//application.
lpJVMThread->WaitForThisObject((__COMMON_OBJECT*)lpJVMThread); //Block the shell
//thread until
//the IO control
//application end.
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager, NULL);
KernelThreadManager.DestroyKernelThread((__COMMON_OBJECT*)&KernelThreadManager,
(__COMMON_OBJECT*)lpJVMThread); //Destroy the thread object.
return SHELL_CMD_PARSER_SUCCESS;
}
示例7: IoCtrlApp
//Handler for 'ioctrl' command.
DWORD IoCtrlApp(__CMD_PARA_OBJ* pCmdParaObj)
{
__KERNEL_THREAD_OBJECT* lpIoCtrlThread = NULL;
lpIoCtrlThread = KernelThreadManager.CreateKernelThread(
(__COMMON_OBJECT*)&KernelThreadManager,
0,
KERNEL_THREAD_STATUS_READY,
PRIORITY_LEVEL_NORMAL,
IoCtrlStart,
NULL,
NULL,
"IO CTRL");
if(NULL == lpIoCtrlThread) //Can not create the IO control thread.
{
PrintLine("Can not create IO control thread.");
return SHELL_CMD_PARSER_SUCCESS;
}
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager,
(__COMMON_OBJECT*)lpIoCtrlThread); //Set the current focus to IO control
//application.
lpIoCtrlThread->WaitForThisObject((__COMMON_OBJECT*)lpIoCtrlThread); //Block the shell
//thread until
//the IO control
//application end.
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager,NULL);
KernelThreadManager.DestroyKernelThread((__COMMON_OBJECT*)&KernelThreadManager,
(__COMMON_OBJECT*)lpIoCtrlThread); //Destroy the thread object.
return SHELL_CMD_PARSER_SUCCESS;
}
示例8: SysDiagApp
//
//System diag application's shell start code.
//
DWORD SysDiagApp(__CMD_PARA_OBJ* pCmdParaObj)
{
__KERNEL_THREAD_OBJECT* lpSysDiagThread = NULL;
lpSysDiagThread = KernelThreadManager.CreateKernelThread(
(__COMMON_OBJECT*)&KernelThreadManager,
0,
KERNEL_THREAD_STATUS_READY,
PRIORITY_LEVEL_NORMAL,
SysDiagStart,
NULL,
NULL,
"SYS DIAG");
if(NULL == lpSysDiagThread) //Can not create the kernel thread.
{
PrintLine("Can not start system diag application,please retry again.");
return SHELL_CMD_PARSER_SUCCESS;
}
DeviceInputManager.SetFocusThread((__COMMON_OBJECT*)&DeviceInputManager,
(__COMMON_OBJECT*)lpSysDiagThread);
lpSysDiagThread->WaitForThisObject((__COMMON_OBJECT*)lpSysDiagThread);
KernelThreadManager.DestroyKernelThread((__COMMON_OBJECT*)&KernelThreadManager,
(__COMMON_OBJECT*)lpSysDiagThread); //Destroy the kernel thread object.
return SHELL_CMD_PARSER_SUCCESS;
}
示例9: pcilist
static DWORD pcilist(__CMD_PARA_OBJ* lpParamObj)
{
#ifdef __CFG_SYS_DDF
DWORD dwLoop = 0;
__PHYSICAL_DEVICE* lpPhyDev = NULL;
PrintLine(" Device ID/Vendor ID Bus Number Description");
for(dwLoop = 0;dwLoop < MAX_BUS_NUM;dwLoop ++)
{
if(DeviceManager.SystemBus[dwLoop].dwBusType == BUS_TYPE_PCI)
{
lpPhyDev = DeviceManager.SystemBus[dwLoop].lpDevListHdr;
while(lpPhyDev) //Travel all list
{
OutputDevInfo(lpPhyDev);
lpPhyDev = lpPhyDev->lpNext;
}
}
}
return SHELL_CMD_PARSER_SUCCESS;
#else
return SHELL_CMD_PARSER_FAILED;
#endif
}
示例10: Print_Welcome
//print welcome message
void Print_Welcome()
{
PrintLine();
strcpy(printTxt, "************************"); PrintLn(printTxt);
strcpy(printTxt, "* AVR IO CONTROL *"); PrintLn(printTxt);
strcpy(printTxt, "* (C) 2007, OLIMEX Ltd *"); PrintLn(printTxt);
strcpy(printTxt, "************************"); PrintLn(printTxt);
}
示例11: memmove
int PostScriptDrv::PrintLine(char *s, unsigned max_len,
GXSTD::ofstream &stream)
{
if(s == 0 || max_len <= 0) return 0;
if(strlen(s) > max_len) {
char *buf = new char[max_len];
// PC-lint 04/26/2005: Possible access of out-of-bounds pointer
buf[max_len-1] = '\0';
memmove(buf, s, max_len);
int rv = PrintLine(buf, stream);
delete [] buf;
return rv;
}
else
return PrintLine(s, stream);
}
示例12: Print_Welcome
//print welcome message
void Print_Welcome()
{
PrintLine();
strcpy(printTxt, "***********"); PrintLn(printTxt);
strcpy(printTxt, "Welcome "); PrintLn(printTxt);
strcpy(printTxt, version ); PrintLn(printTxt);
strcpy(printTxt, "***********"); PrintLn(printTxt);
}
示例13: inputd
static DWORD inputd(__CMD_PARA_OBJ* lpParamObj)
{
DWORD dwVal = 0;
WORD wPort = 0;
CHAR strBuffer[15];
if(NULL == lpParamObj) //Parameter check.
return IOCTRL_TERMINAL;
if(lpParamObj->byParameterNum < 2) //Not enough parameters.
{
PrintLine("Please input the port value.");
return IOCTRL_NORMAL;
}
if(!Str2Hex(lpParamObj->Parameter[1],&dwVal)) //Incorrect port value.
{
PrintLine("Please input the port correctly.");
return IOCTRL_NORMAL;
}
wPort = (WORD)(dwVal);
#ifdef __I386__ //Read data from port.
__asm{
push eax
push edx
mov dx,wPort
in eax,dx
mov dwVal,eax
pop edx
pop eax
}
#else
#endif
strBuffer[0] = ' ';
strBuffer[1] = ' ';
strBuffer[2] = ' ';
strBuffer[3] = ' ';
Hex2Str(dwVal,&strBuffer[4]);
PrintLine(strBuffer); //Print out the byte.
return 0;
}
示例14: main
int main(void)
{
int n = GetUserInput();
for (int i = 1; i <= n; i++)
{
PrintLine(n - i, i);
}
}
示例15: PrintIndentation
void cDexCodeWriter::PrintStartEndLine(
CHAR* Arguments
)
{
PrintIndentation();
PrintLine(Arguments);
}