At the moment I am expirementing with the bfile syscalls. But I'm stumped I thought I understood some but.. nope. So right now I am just trying to get Bfile_StrToName_ncpy to copperate.
Anyone feeling like they want to help? I am trying to make a file named "new" but I seem to be doing it wrong. If you want to help me, I just need some code that used Bfile_StrToName_ncpy to change my "new" into the 16 bit needed and then actually make the file with Bfile_CreateEntry_OS. Thanks a ton.
Here's some code that should do that:

Code:

//Different modes of opening and creating files
#define CREATEMODE_FILE 1
#define CREATEMODE_FOLDER 5
#define READ 0
#define READ_SHARE 1
#define WRITE 2
#define READWRITE 3
#define READWRITE_SHARE 4

#define RETURN_SUCCESS 0
#define RETURN_ERROR -1

unsigned short filebuffer[] = {'\\','\\','f','l','s','0','\\','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0'};   //the 16-bit buffer where the filename will be stored, Note: the \ is escaped so it looks like \\
char* filename = "new"; //the name of the file
Bfile_StrToName_ncpy(filebuffer+(7), filename, strlen(filename)); //copy the filename to the filebuffer after "\\fls0\"

//Actually create the file
int size = 200; 
int fh;
if (0 > (fh = Bfile_OpenFile_OS(filebuffer,READWRITE))) {
        if (Bfile_CreateEntry_OS(filebuffer, CREATEMODE_FILE, &size) < 0)
         return RETURN_ERROR;

It doesn't want to compile with that code.
What are the errors? Did you include the proper headers?
yeah i did. Here is my lousy code showing what lameness I have.

Code:

#include <display_syscalls.h>
#include <keyboard_syscalls.h>
#include "color.h"
#include <keyboard_syscalls.h>
#include <keyboard.h>
#include <keyboard.hpp>   
#include <string.h>     
#include <system.h>   
#include <stdlib.h>   
#include <stdio.h>
#include "textinput.h"
 
//Different modes of opening and creating files 
#define CREATEMODE_FILE 1 
#define CREATEMODE_FOLDER 5 
#define READ 0 
#define READ_SHARE 1 
#define WRITE 2 
#define READWRITE 3 
#define READWRITE_SHARE 4 
 
#define RETURN_SUCCESS 0 
#define RETURN_ERROR -1 
 
unsigned short filebuffer[] = {'\\','\\','f','l','s','0','\\','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0'};   //the 16-bit buffer where the filename will be stored, Note: the \ is escaped so it looks like \\ 
char* filename = "new"; //the name of the file 

void keymenu();
int PRGM_GetKey();

int inMenu=0;
int Counter=0;

int main(void) {   
  while(1) {   
    if(PRGM_GetKey() == KEY_PRGM_MENU) {
      keymenu();
    }
      if (keydown(KEY_PRGM_F1)) {
         if ((inMenu==0) & (Counter==0)) {
            inMenu=1;
            Counter=15;
            PrintCXY( 55, 170, "New Save", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 );
         }
         if ((inMenu==1) & (Counter==0)) {
            inMenu=0;
            Counter=15;
            PrintCXY( 55, 170, "        ", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 );
         }
      }
      if ((keydown(KEY_PRGM_F2)) & (inMenu==1)) {
      Bfile_StrToName_ncpy(filebuffer+(7), filename, strlen(filename)); //copy the filename to the filebuffer after "\\fls0\" 
      //Actually create the file 
         int size = 200;   
         if (0 > (fh = Bfile_OpenFile_OS(filebuffer,READWRITE))) { 
            if (Bfile_CreateEntry_OS(filebuffer, CREATEMODE_FILE, &size) < 0) 
            return RETURN_ERROR; 
         }   
      }
   if (Counter!=0) Counter--;
   Bdisp_PutDisp_DD();
  } 
  return 0; 
}

int PRGM_GetKey(){ 
   unsigned char buffer[12]; 
   PRGM_GetKey_OS( buffer ); 
   return ( buffer[1] & 0x0F ) * 10 + ( ( buffer[2] & 0xF0 ) >> 4 ); 
}
void keymenu(void) {   
   int key = KEY_PRGM_MENU;   
   GetKey(&key);   
}
int keydown(int basic_keycode) { 
   const unsigned short* lastkey = (unsigned short*)0xA44B0000; 
   int row, col, word, bit;     
   row = basic_keycode%10;     
   col = basic_keycode/10-1;     
   word = row>>1;     
   bit = col + 8*(row&1);     
   return (0 != (lastkey[word] & 1<<bit));     
}

AND ERRORS

Code:

C:\PrizmSDK-0.3\projects\LuaPe>..\..\bin\make.exe 
sh3eb-elf-gcc -MMD -MP -MF C:/PrizmSDK-0.3/projects/LuaPe/build/LuaPe.d -Os 
 -Wall -mb -m4a-nofpu -mhitachi -nostdlib   -IC:/PrizmSDK-0.3/projects/LuaPe 
/build -IC:/PrizmSDK-0.3/include -std=c99 -c C:/PrizmSDK-0.3/projects/LuaPe 
/src/LuaPe.c -o LuaPe.o 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:25:152: warning: multi-line comm 
ent [-Wcomment] 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c: In function 'main': 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:39:3: warning: implicit declarat 
ion of function 'keydown' [-Wimplicit-function-declaration] 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:43:5: warning: pointer targets i 
n passing argument 3 of 'PrintCXY' differ in signedness [-Wpointer-sign] 
C:/PrizmSDK-0.3/include/display_syscalls.h:67:6: note: expected 'unsigned char * 
' but argument is of type 'char *' 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:48:5: warning: pointer targets i 
n passing argument 3 of 'PrintCXY' differ in signedness [-Wpointer-sign] 
C:/PrizmSDK-0.3/include/display_syscalls.h:67:6: note: expected 'unsigned char * 
' but argument is of type 'char *' 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:52:3: warning: implicit declarat 
ion of function 'Bfile_StrToName_ncpy' [-Wimplicit-function-declaration] 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:52:40: error: 'filename' undecla 
red (first use in this function) 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:52:40: note: each undeclared ide 
ntifier is reported only once for each function it appears in 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:52:3: warning: implicit declarat 
ion of function 'strlen' [-Wimplicit-function-declaration] 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:52:50: warning: incompatible imp 
licit declaration of built-in function 'strlen' [enabled by default] 
C:/PrizmSDK-0.3/projects/LuaPe/src/LuaPe.c:56:5: warning: implicit declarat 
ion of function 'Bfile_CreateEntry_OS' [-Wimplicit-function-declaration] 
make[1]: *** [LuaPe.o] Error 1 
make: *** [build] Error 2 
 
C:\PrizmSDK-0.3\projects\LuaPe>pause 
Press any key to continue . . . 
I edited my code above to add an "int fh;" right after declaring the size variable, so try compiling with that.

Edit: I figured out what was causing the error. Remove the filename and fh declarations before main(), and add them back in after main().

Code:

#include <display_syscalls.h>
#include <keyboard_syscalls.h>
#include "color.h"
#include <keyboard_syscalls.h> 
#include <keyboard.h> 
#include <keyboard.hpp>   
#include <string.h>     
#include <system.h>   
#include <stdlib.h>   
#include <stdio.h>   
#include "textinput.h"
 
//Different modes of opening and creating files   
#define CREATEMODE_FILE 1   
#define CREATEMODE_FOLDER 5   
#define READ 0   
#define READ_SHARE 1   
#define WRITE 2   
#define READWRITE 3   
#define READWRITE_SHARE 4   
 
#define RETURN_SUCCESS 0   
#define RETURN_ERROR -1   
 
unsigned short filebuffer[] = {'\\','\\','f','l','s','0','\\','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0'};   //the 16-bit buffer where the filename will be stored, Note: the \ is escaped so it looks like \\   


void keymenu();
int PRGM_GetKey();

int inMenu=0;
int Counter=0;

int main(void) {   
 int fh;
 char* filename = "new"; //the name of the file           
  while(1) {   
    if(PRGM_GetKey() == KEY_PRGM_MENU) { 
      keymenu();
    } 
      if (keydown(KEY_PRGM_F1)) {
         if ((inMenu==0) & (Counter==0)) {
            inMenu=1;
            Counter=15;
            PrintCXY( 55, 170, "New Save", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 );
         }
         if ((inMenu==1) & (Counter==0)) {
            inMenu=0;
            Counter=15;
            PrintCXY( 55, 170, "        ", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 );
         }
      }
      if ((keydown(KEY_PRGM_F2)) & (inMenu==1)) {
      Bfile_StrToName_ncpy(filebuffer+(7), filename, strlen(filename)); //copy the filename to the filebuffer after "\\fls0\"   
      //Actually create the file   
         int size = 200;   
         if (0 > (fh = Bfile_OpenFile_OS(filebuffer,READWRITE))) {   
            if (Bfile_CreateEntry_OS(filebuffer, CREATEMODE_FILE, &size) < 0)   
            return RETURN_ERROR;   
         }   
      }
   if (Counter!=0) Counter--;
   Bdisp_PutDisp_DD();
  }   
  return 0;   
}
Okay now that the bfile has been figured out. Thanks to souvik. I am moving on to actually editing. This program runs fine untill I push F5 in the menu I made, to edit. When that happens it exits to the home menu. Anyone feeling like helping me? Thanks.

Code:

#include <display_syscalls.h> 
#include <keyboard_syscalls.h> 
#include "color.h" 
#include <keyboard_syscalls.h>   
#include <keyboard.h>   
#include <keyboard.hpp>     
#include <string.h>       
#include <system.h>     
#include <stdlib.h>     
#include <stdio.h>     
   
//Different modes of opening and creating files     
#define CREATEMODE_FILE 1     
#define CREATEMODE_FOLDER 5     
#define READ 0     
#define READ_SHARE 1     
#define WRITE 2     
#define READWRITE 3     
#define READWRITE_SHARE 4     
   
#define RETURN_SUCCESS 0     
#define RETURN_ERROR -1     
   
unsigned short filebuffer[] = {'\\','\\','f','l','s','0','\\','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0'};   //the 16-bit buffer where the filename will be stored, Note: the \ is escaped so it looks like \\     

//char *buffer = malloc(256); // Some string length
char buffer[256];
int start = 0; // Used for scrolling left and right
int cursor = 0; // Cursor position

//buffer[0] = '\0'; // This sets the first character to \0, also represented by "", an empty string
 
void keymenu(); 
int PRGM_GetKey(); 
 
int inMenu=0; 
int Counter=0; 
int x=72;
int y=173;
int update=1;
int key;
 
int main(void) {     
 int fh; 
 char* filename = "new.lua"; //the name of the file             
  while(1) {     
    if(PRGM_GetKey() == KEY_PRGM_MENU) {   
      keymenu(); 
    }   
      if (update==1) {
         update=0;
         DisplayMBString((unsigned char*) buffer, start, cursor, 1, 1);
      }
      if (keydown(KEY_PRGM_F5)) {
         if(key == KEY_CTRL_EXE || key == KEY_CTRL_EXIT) {
            EditMBStringCtrl( buffer, 256, &start, &cursor, &key, 1, 1);
            free(buffer);
         } break;
      }
      if (keydown(KEY_PRGM_F1)) { 
         if ((inMenu==0) & (Counter==0)) { 
            inMenu=1; 
            Counter=15; 
            x=72;
            PrintMini( &x, &y, "New    Save   Open   Edit", 0, 0xffffffff, 0, 0, COLOR_BLACK, COLOR_WHITE, 1, 0);
         } 
         if ((inMenu==1) & (Counter==0)) { 
            inMenu=0; 
            Counter=15; 
            PrintCXY( 55, 173, "                         ", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 ); 
         } 
      } 
      if ((keydown(KEY_PRGM_F2)) & (inMenu==1)) { 
      Bfile_StrToName_ncpy(filebuffer+(7), filename, strlen(filename)); //copy the filename to the filebuffer after "\\fls0\"     
      //Actually create the file     
         int size = 256;     
         if (0 > (fh = Bfile_OpenFile_OS(filebuffer,READWRITE))) {     
            if (Bfile_CreateEntry_OS(filebuffer, CREATEMODE_FILE, &size) < 0)     
            return RETURN_ERROR;     
         }     
      } 
   if (Counter!=0) Counter--; 
   Bdisp_PutDisp_DD(); 
  }     
  return 0;     
}

int PRGM_GetKey(){ 
   unsigned char buffer[12]; 
   PRGM_GetKey_OS( buffer ); 
   return ( buffer[1] & 0x0F ) * 10 + ( ( buffer[2] & 0xF0 ) >> 4 ); 
}
void keymenu(void) {   
   int key = KEY_PRGM_MENU;   
   GetKey(&key);   
}
int keydown(int basic_keycode) { 
   const unsigned short* lastkey = (unsigned short*)0xA44B0000; 
   int row, col, word, bit;     
   row = basic_keycode%10;     
   col = basic_keycode/10-1;     
   word = row>>1;     
   bit = col + 8*(row&1);     
   return (0 != (lastkey[word] & 1<<bit));     
}

Code:
      if (keydown(KEY_PRGM_F5)) {
         if(key == KEY_CTRL_EXE || key == KEY_CTRL_EXIT) {
            EditMBStringCtrl( buffer, 256, &start, &cursor, &key, 1, 1); 
            free(buffer);
         } break;
      }
Apaprently key is neither CTRL_EXE nor CTRL_EXIT, which means the inner code does not execute, the break does, the while() loop ends, the return; in main() is reached, and voila, main menu.
Ok, let me jsut list off problems:

KEY_PRGM is for raw key codes, KEY_CTRL is for GetKey and friends.
You never call EditMBStringCtrl for keys
You don't use GetKey
You don't need to call DisplayMBString, except for the first time.
AHelper wrote:
KEY_PRGM is for raw key codes, KEY_CTRL is for GetKey and friends.
True, but I'm even more confused why he's trying to detect F5-EXIT or F5-EXE as key combinations, which appears to be the case here.
More errors: You free a non-malloc'd area of memory.

I recommend you directly copy-paste my input function and understand how it all works before trying to recreate it.
Okay I fixed all those problems.
@ Kerm: the F5 key activates editing, previous to that I will have a cursor that is movable to any position. After moving to where you want you push F5 to activate the edit.
More questions/concerns:
-Getting error: initializer element is not constant, on char *buffer = malloc(256);
-Getting error: invalid initializer, on buffer[0]='\0';
-The cursor blinks for key input but it won't detect any key presses

Code:

#include <display_syscalls.h> 
#include <keyboard_syscalls.h> 
#include "color.h" 
#include <keyboard_syscalls.h>   
#include <keyboard.h>   
#include <keyboard.hpp>     
#include <string.h>       
#include <system.h>     
#include <stdlib.h>     
#include <stdio.h>     
   
//Different modes of opening and creating files     
#define CREATEMODE_FILE 1     
#define CREATEMODE_FOLDER 5     
#define READ 0     
#define READ_SHARE 1     
#define WRITE 2     
#define READWRITE 3     
#define READWRITE_SHARE 4     
   
#define RETURN_SUCCESS 0     
#define RETURN_ERROR -1     
   
unsigned short filebuffer[] = {'\\','\\','f','l','s','0','\\','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0'};   //the 16-bit buffer where the filename will be stored, Note: the \ is escaped so it looks like \\     

char *buffer = malloc(256); // Some string length
//char buffer[256];
int start = 0; // Used for scrolling left and right
int cursor = 0; // Cursor position

buffer[0] = '\0'; // This sets the first character to \0, also represented by "", an empty string
 
void keymenu(); 
int PRGM_GetKey(); 
 
int inMenu=0; 
int Counter=0; 
int x=72;
int y=173;
int update=1;
int key;
int CursorX=1;
int CursorY=1;
 
int main(void) {     
 int fh; 
 char* filename = "new.lua"; //the name of the file             
  while(1) {     
    if(PRGM_GetKey() == KEY_PRGM_MENU) {   
      keymenu(); 
    }   
      if (update==1) {
         update=0;
         DisplayMBString( buffer, start, cursor, 1, 1);
      }
      if (keydown(KEY_PRGM_F5) & (inMenu==1)) {
         PrintCXY( 55, 173, "                         ", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 ); 
         while (keydown(KEY_PRGM_EXIT)==0) {
            GetKey(&key);
            EditMBStringCtrl( buffer, 256, &start, &cursor, &key, 1, 1);    Bdisp_PutDisp_DD();
            }
         update=1;
      }
      if (keydown(KEY_PRGM_F1)) { 
         if ((inMenu==0) & (Counter==0)) { 
            inMenu=1; 
            Counter=15;
            y=173;
            x=72;
            PrintMini( &x, &y, "New    Save   Open   Edit", 0, 0xffffffff, 0, 0, COLOR_BLACK, COLOR_WHITE, 1, 0);
         } 
         if ((inMenu==1) & (Counter==0)) { 
            inMenu=0; 
            Counter=15; 
            PrintCXY( 55, 173, "                         ", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 ); 
         } 
      } 
      if ((keydown(KEY_PRGM_F2)) & (inMenu==1)) { 
      Bfile_StrToName_ncpy(filebuffer+(7), filename, strlen(filename)); //copy the filename to the filebuffer after "\\fls0\"     
      //Actually create the file     
         int size = 256;     
         if (0 > (fh = Bfile_OpenFile_OS(filebuffer,READWRITE))) {     
            if (Bfile_CreateEntry_OS(filebuffer, CREATEMODE_FILE, &size) < 0)     
            return RETURN_ERROR;     
         }     
      } 
   if (Counter!=0) Counter--; 
   Bdisp_PutDisp_DD(); 
  }   
   free(buffer);
  return 0;     
}

int PRGM_GetKey(){ 
   unsigned char buffer[12]; 
   PRGM_GetKey_OS( buffer ); 
   return ( buffer[1] & 0x0F ) * 10 + ( ( buffer[2] & 0xF0 ) >> 4 ); 
}
void keymenu(void) {   
   int key = KEY_PRGM_MENU;   
   GetKey(&key);   
}
int keydown(int basic_keycode) { 
   const unsigned short* lastkey = (unsigned short*)0xA44B0000; 
   int row, col, word, bit;     
   row = basic_keycode%10;     
   col = basic_keycode/10-1;     
   word = row>>1;     
   bit = col + 8*(row&1);     
   return (0 != (lastkey[word] & 1<<bit));     
}
zeldaking wrote:
More questions/concerns:
-Getting error: initializer element is not constant, on char *buffer = malloc(256);
-Getting error: invalid initializer, on buffer[0]='\0';
-The cursor blinks for key input but it won't detect any key presses

Code:

#include <display_syscalls.h> 
#include <keyboard_syscalls.h> 
#include "color.h" 
#include <keyboard_syscalls.h>   
#include <keyboard.h>   
#include <keyboard.hpp>     
#include <string.h>       
#include <system.h>     
#include <stdlib.h>     
#include <stdio.h>     
   
//Different modes of opening and creating files     
#define CREATEMODE_FILE 1     
#define CREATEMODE_FOLDER 5     
#define READ 0     
#define READ_SHARE 1     
#define WRITE 2     
#define READWRITE 3     
#define READWRITE_SHARE 4     
   
#define RETURN_SUCCESS 0     
#define RETURN_ERROR -1     
   
unsigned short filebuffer[] = {'\\','\\','f','l','s','0','\\','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0'};   //the 16-bit buffer where the filename will be stored, Note: the \ is escaped so it looks like \\     

char *buffer = malloc(256); // Some string length
//char buffer[256];
int start = 0; // Used for scrolling left and right
int cursor = 0; // Cursor position

buffer[0] = '\0'; // This sets the first character to \0, also represented by "", an empty string
 
void keymenu(); 
int PRGM_GetKey(); 
 
int inMenu=0; 
int Counter=0; 
int x=72;
int y=173;
int update=1;
int key;
int CursorX=1;
int CursorY=1;
 
int main(void) {     
 int fh; 
 char* filename = "new.lua"; //the name of the file             
  while(1) {     
    if(PRGM_GetKey() == KEY_PRGM_MENU) {   
      keymenu(); 
    }   
      if (update==1) {
         update=0;
         DisplayMBString( buffer, start, cursor, 1, 1);
      }
      if (keydown(KEY_PRGM_F5) & (inMenu==1)) {
         PrintCXY( 55, 173, "                         ", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 ); 
         while (keydown(KEY_PRGM_EXIT)==0) {
            GetKey(&key);
            EditMBStringCtrl( buffer, 256, &start, &cursor, &key, 1, 1);    Bdisp_PutDisp_DD();
            }
         update=1;
      }
      if (keydown(KEY_PRGM_F1)) { 
         if ((inMenu==0) & (Counter==0)) { 
            inMenu=1; 
            Counter=15;
            y=173;
            x=72;
            PrintMini( &x, &y, "New    Save   Open   Edit", 0, 0xffffffff, 0, 0, COLOR_BLACK, COLOR_WHITE, 1, 0);
         } 
         if ((inMenu==1) & (Counter==0)) { 
            inMenu=0; 
            Counter=15; 
            PrintCXY( 55, 173, "                         ", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_WHITE, 1, 0 ); 
         } 
      } 
      if ((keydown(KEY_PRGM_F2)) & (inMenu==1)) { 
      Bfile_StrToName_ncpy(filebuffer+(7), filename, strlen(filename)); //copy the filename to the filebuffer after "\\fls0\"     
      //Actually create the file     
         int size = 256;     
         if (0 > (fh = Bfile_OpenFile_OS(filebuffer,READWRITE))) {     
            if (Bfile_CreateEntry_OS(filebuffer, CREATEMODE_FILE, &size) < 0)     
            return RETURN_ERROR;     
         }     
      } 
   if (Counter!=0) Counter--; 
   Bdisp_PutDisp_DD(); 
  }   
   free(buffer);
  return 0;     
}

int PRGM_GetKey(){ 
   unsigned char buffer[12]; 
   PRGM_GetKey_OS( buffer ); 
   return ( buffer[1] & 0x0F ) * 10 + ( ( buffer[2] & 0xF0 ) >> 4 ); 
}
void keymenu(void) {   
   int key = KEY_PRGM_MENU;   
   GetKey(&key);   
}
int keydown(int basic_keycode) { 
   const unsigned short* lastkey = (unsigned short*)0xA44B0000; 
   int row, col, word, bit;     
   row = basic_keycode%10;     
   col = basic_keycode/10-1;     
   word = row>>1;     
   bit = col + 8*(row&1);     
   return (0 != (lastkey[word] & 1<<bit));     
}

Firstly, you can't do any code outside of a function. Move non-static initializers into main() (aimed at your buffer variable).

Second, my code was wrong, which was why I said to use my code as-is Wink Working on a solution. Shout-out to KermM, this bug is from the file browser code. Therefore, text input there is wrong.
Much thanks goes out to Ahelper, he knows his stuff.
Now for that editor code, it edits a single line. If I want to add multi lines, should I add something to detect [enter] which moves to the next line?
If you want a nano-like editing style, you can do multiple MBStrings.

If you want word/line-wrapping, I think you either need to find a syscall or just make one yourself.
So for each MBString I'll need its own char string correct? Also its own cursor var? I could do an array that holds that info.
nano shares it. I think passing a larger cursor than string length could be auto-handled, but not 100% sure.
Word and line-wrapping is a massive pain; there's so much to handle. Sad Actually, arbitrary text insertion and deletion is a massive pain without wrapping, because you need to deal with the alignment of all text beyond the cursor potentially changing. Things are a lot less painful if you're using a fixed-width font, but for the DCS text-editing routines, of course I had to be an overachiever and go for variable-width text. :/
Ah so when you switch strings it stays in same x pos, but if it is over it brings back to length of string. Darn, are all strings/arrays static length? Also for nano editing will I need multiple strings?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement