search for: curpo

Displaying 13 results from an estimated 13 matches for "curpo".

Did you mean: curso
2008 Oct 22
1
NEW: COM32 module to alias
...DEBUG 1 #define APP_LONGNAME "Alias COM32" #define APP_NAME "alias" #define APP_YEAR "2008" #define APP_AUTHOR "Gene Cumm" #define APP_VER "beta-b002" int main(int argc, char *argv[]){ char cmdstr[ALIAS_CMD_SZ]; // Command string to execute int curpos; // Current position in cmdstr; Use memcpy rather than strcat int arglen; // length of current argument string int i; // Initialization curpos = 0; cmdstr[0] = 0; for(i=1; i<argc; i++){ arglen = strlen(argv[i]); memcpy(cmdstr + curpos, argv[i], arglen); curpos += arglen; cmdstr[c...
2008 Oct 27
0
NEW: COM32 module to alias (Revised)
...output #define APP_LONGNAME "Alias COM32" #define APP_NAME "alias" #define APP_YEAR "2008" #define APP_AUTHOR "Gene Cumm" #define APP_VER "beta-b003" int main(int argc, char *argv[]) { char cmdstr[ALIAS_CMD_SZ]; // Command string to execute int curpos; // Current position in cmdstr; Use memcpy rather than strcat int arglen; // length of current argument string int i; // Initialization curpos = 0; cmdstr[0] = 0; #ifdef DO_DEBUG printf("\n%d\n\n", ALIAS_CMD_SZ); #endif /* DO_DEBUG */ for(i=1; i<argc; i++) { arglen = strlen...
2010 Sep 16
1
[RFC] function to parse string to argc/argv pair
...s into one string * str Output character array * strl Size of array * argc Argument Count * argv Argument Values * returns Length of output string (like strlen()) */ int argcat(char *str, const int strl, const int argc, char *argv[]) { int i, arglen; /* index, argument length */ int curpos, maxlen = strl - 1; /* current position in str */ curpos = 0; str[0] = '\0'; /* Nullify string just to be sure */ for (i = 0; i < argc; i++) { arglen = strlen(argv[i]); /* Theoretically, this should never be met in SYSLINUX */ if ((curpos + arglen) > maxlen) argl...
2009 Feb 22
2
NEW: COM32 module to run another command, optionally clearing the screen
..._DEBUG */ #define APP_LONGNAME "Run COM32" #define APP_NAME "run" #define APP_YEAR "2009" #define APP_AUTHOR "Gene Cumm" #define APP_VER "beta-b005" int main(int argc, char *argv[]) { char cmdstr[RUN_CMD_SZ]; /* Command string to execute */ int curpos; /* Current position in cmdstr; Use memcpy rather than strcat */ int arglen; /* length of current argument string */ int argst; /* Starting argument to listen to */ int i; /* Initialization */ curpos = 0; argst = 1; cmdstr[0] = 0; console_ansi_std(); DEBUG_PRINTF("\nMax Command li...
2009 Mar 07
3
rosh patch V2
Here is a second version of my patch from last night. It uses the provided ctype function isspace and does the same readdir(). I remove the rosh_issp() function. I admit to being a bit liberal with my use of braces and spaces. We all of the habit of knowing we can invent a more perfect wheel. Let me know if you have any questions. Keith -------------- next part -------------- A non-text
2009 Feb 15
2
COM32 module: Read-Only shell
...#39;: + rv = 1; break; + default: rv = 0; + } + return rv; +} /* ros_issp */ + +/* Search a string for first non-space (' ') character, starting at ipos + * istr input string to parse + * ipos input position to start at + */ +int rosh_search_nonsp(const char *istr, const int ipos) +{ + int curpos; + char c; + + curpos = ipos; + c = istr[curpos]; + while (rosh_issp(c) && c != 0) + c = istr[++curpos]; + return curpos; +} + +/* Search a string for space (' '), returning the position of the next space + * or the '\0' at end of string + * istr input string to parse + *...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...- default: - rv = 0; - } - return rv; -} /* ros_issp */ - /* Search a string for first non-space (' ') character, starting at ipos * istr input string to parse * ipos input position to start at @@ -85,7 +63,7 @@ int rosh_search_nonsp(const char *istr, const int ipos) curpos = ipos; c = istr[curpos]; - while (rosh_issp(c) && c != 0) + while (c && isspace(c)) c = istr[++curpos]; return curpos; } @@ -102,7 +80,7 @@ int rosh_search_sp(const char *istr, const int ipos) curpos = ipos; c = istr[curpos]; - while (!(rosh_issp(c...
2019 May 29
1
How to improve the performance with unix_convert ?
...improved . static int get_real_filename_full_scan(connection_struct *conn, const char *path, const char *name, bool mangled, TALLOC_CTX *mem_ctx, char **found_name) { struct smb_Dir *cur_dir; const char *dname = NULL; char *talloced = NULL; char *unmangled_name = NULL; long curpos; struct smb_filename *smb_fname = NULL; /* handle null paths */ if ((path == NULL) || (*path == 0)) { path = "."; } /* If we have a case-sensitive filesystem, it doesn't do us any * good to search for a name. If a case variation of the name was * there, then the original stat(2)...
2015 Apr 30
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
I don't think we should make flush virtual. Why do you need to do it? Can't you set up the base class to write to use the tail of the memory region as the buffer? On 24 April 2015 at 06:46, Yaron Keren <yaron.keren at gmail.com> wrote: > Hi, > > Is this what you're thinking about? > The code is not tested yet, I'd like to know if the overall direction and >
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
Could you dig into why: + raw_ostream &write(unsigned char C) override { + grow(1); + *OutBufCur++ = C; + return *this; + } Is 3 times as fast as raw_svector_ostream? I don't see a good reason why that should be any faster than: raw_ostream &operator<<(char C) { if (OutBufCur >= OutBufEnd) return write(C); *OutBufCur++ = C; return *this; }
2015 Apr 20
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
Sean, thanks for reminding this, Alp did commit a class derived from raw_svector_ostream conatining an internal SmallString he called small_string_ostream. The commit was reverted after a day due to a disagreement about the commit approval and apparently abandoned. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223393.html
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...ectBuffer) delete [] OutBufStart; OutBufStart = BufferStart; OutBufEnd = OutBufStart+Size; @@ -751,6 +751,29 @@ OS.append(Ptr, Size); } +void raw_char_ostream::grow(size_t Size) { + size_t CurBytesAvailable = OutBufEnd - OutBufCur; + if (Size > CurBytesAvailable) { + size_t CurPos = OutBufCur - OutBufStart; + OutBufCur = OutBufStart; + size_t NewSize = size_t(NextPowerOf2(CurPos + Size + 2)); + SetBufferAndMode(new char[NewSize], NewSize, DirectBuffer); + OutBufCur = OutBufStart + CurPos; + } +} + +raw_ostream &raw_char_ostream::write(unsigned char C) { +...
1998 Apr 14
3
Printer queue problem (LPRng 3.4.2, Samba 1.9.18p4, Solaris 2.5.1/2.6)
I've been having a problem with Win95 clients watching a printer queue on the Samba server (called labserv2). labserv2 is a Solaris 2.5.1 machine running samba 1.9.18p4. The printing system is LPRng 3.4.2. A user can watch the printer queue from a Win95 client machine. However, when the printer queue gets backed up (usually about 12 jobs), the queue window locks. The corresponding smbd