Check-in [38b62a8138]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:forgot to make it before committing.. oops
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:38b62a81384286d518864c130a62c665644437458b0b244b52af5324c83203d2
User & Date: grable 2018-11-01 00:56:22
Context
2018-11-01
03:10
reworked unwrap command and added array elements in the process check-in: f5569e7f7a user: grable tags: trunk
00:56
forgot to make it before committing.. oops check-in: 38b62a8138 user: grable tags: trunk
00:54
beginnings of unwrapping arrays, though commented out for now check-in: d013f0e2ff user: grable tags: trunk
Changes

Changes to jimff-commands.c.

   505    505   	Jim_Obj* list;
   506    506   	int index;
   507    507   	int count;
   508    508   	char* end;
   509    509   	void* p;
   510    510   	char tag;
   511    511   	
   512         -	if(argc >= 1 && Jim_StringCompareImmediate( interp, argv[1], "-packed")) {
          512  +	if(argc >= 1 && Jim_CompareStringImmediate( interp, argv[1], "-packed")) {
   513    513   		packed = 1;
   514    514   		argv++;
   515    515   		argc--;
   516    516   	}
   517    517   	
   518    518   	if(argc < 3) {
   519    519   wrongnumargs:
................................................................................
   537    537   
   538    538   #define struct_ptr(t)		((t*)(ptr + offs))
   539    539   #define struct_elem(t)	({ t _val = *struct_ptr(t); offs += sizeof(t); _val; })
   540    540   #define GET_ELEM(v)		({ if(list) Jim_ListAppendElement( interp, list, (v));								\
   541    541   										else { Jim_SetVariable( interp, argv[index++], (v)); index++; } })
   542    542   	
   543    543   	offs = 0;
   544         -	
   545         -	for( const char* t = typetag; ;;) {
          544  +	for( const char* t = typetag; ;) {
   546    545   		switch(*t) {
   547    546   			case '\0':	goto done;
   548    547   			case 'v':	goto err_invalid_typetag;
   549    548   			case 'c':	tag = *t; GET_ELEM( Jim_NewIntObj( interp, struct_elem(signed char))); break;
   550    549   			case 'b':
   551    550   			case 'C':	tag = *t; GET_ELEM( Jim_NewIntObj( interp, struct_elem(unsigned char))); break;
   552    551   			case 's':	tag = *t; GET_ELEM( Jim_NewIntObj( interp, struct_elem(signed short))); break;
................................................................................
   605    604   							goto err_structs_unsupported;
   606    605   					}
   607    606   				}
   608    607   				break; */
   609    608   			
   610    609   			default:	goto err_invalid_typetag;
   611    610   		}
   612         -		i++;
          611  +		t++;
   613    612   	}	
   614    613   done:
   615    614   	if(list) Jim_SetResult( interp, list);
   616    615   	else Jim_SetResultInt( interp, index - 3);
   617    616   	return JIM_OK;
   618    617   		
   619    618   err_not_pointer:
................................................................................
   648    647   	int offs;
   649    648   	Jim_Obj* list;
   650    649   	int index;
   651    650   	union jimff_result tmp;
   652    651   	int sz;
   653    652   	void* p;
   654    653   	
   655         -	if(argc >= 1 && Jim_StringCompareImmediate( interp, argv[1], "-packed")) {
          654  +	if(argc >= 1 && Jim_CompareStringImmediate( interp, argv[1], "-packed")) {
   656    655   		packed = 1;
   657    656   		argv++;
   658    657   		argc--;
   659    658   	}	
   660    659   	
   661    660   	if(argc < 4) {
   662    661   wrongnumargs: